php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22271 sybase_fetch_array / sybase_fetch_object returns wrong datatype
Submitted: 2003-02-18 08:29 UTC Modified: 2003-02-19 03:40 UTC
From: aheckmann at m-s dot de Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.3.0 OS: SuseLinux
Private report: No CVE-ID: None
 [2003-02-18 08:29 UTC] aheckmann at m-s dot de
if you have in your database in field double 1.1, 2.2, 3.3, 4.4

while($robj=sybase_fetch_object($rs))
{
  echo $robj->double ."\n";
}

output is:

1.1
2
3
4

Only the first value is correct ...



The error seems to be in ext/sybase_ct/php_sybase_ct.c in line 1062:


switch (result->numerics[j]) {
	case 1:
			convert_to_long(&result->data[i][j]);
			break;
	case 2: 
			convert_to_double(&result->data[i][j]); result->numerics[j]= 1; 
			break;
}



why "result->numerics[j]= 1"; //Debugging stuff?



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-19 03:40 UTC] aheckmann at m-s dot de
The Problem is fixed in cvs-snapshot

Thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 11 03:01:28 2024 UTC