php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29504 Inproper handling of empty resultset
Submitted: 2004-08-03 10:20 UTC Modified: 2004-09-07 21:33 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: sq6elt at zp dot amsnet dot pl Assigned:
Status: No Feedback Package: Sybase-ct (ctlib) related
PHP Version: 4.3.8 OS: Linux - Debian, sarge
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-08-03 10:20 UTC] sq6elt at zp dot amsnet dot pl
Description:
------------
If resultset returned by sybase_query is empty, 
following message appears:
 
Warning: sybase_fetch_row(): supplied argument is not a valid Sybase result resource in file.php

Expected to sybase_fetch_row to return false.

Tested on:
Debian Sarge, php 4.3.8, libct1 0.61-5, freetds-dev 0.61-5

With regards,
  Paul



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-17 13:40 UTC] alex dot kiesel at document-root dot de
I cannot reproduce this:

Example code:
<?php

  $sybase= sybase_connect(SYBASE_HOST, SYBASE_USER, SYBASE_PASS);
  
  // Retrieves 2 rows
  var_dump(sybase_query('select * from master..currentpeople'));
  
  // Retrieves 0 rows
  var_dump(sybase_query('select * from master..currentpeople where person = "foobar"'));

?>

Output:
resource(5) of type (sybase-ct result)
resource(6) of type (sybase-ct result)

I assume this is due to your (quite old) FreeTDS version. I am running freetds v0.63.dev.20040814 (though there are several stable versions between our two).
 [2004-09-07 21:33 UTC] thekid@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 19 04:01:31 2024 UTC