ID:               44173
 Updated by:       mbecc...@php.net
 Reported By:      uwendel at mysql dot com
-Status:           Assigned
+Status:           Closed
 Bug Type:         PDO related
 Operating System: Irrelevant
 PHP Version:      5.3CVS-2008-02-19 (CVS)
 Assigned To:      mbeccati
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2009-03-22 19:36:38] matteo at beccati dot com

The following patch also removes the goto from the function, as
suggested by Johannes:

http://www.beccati.com/misc/php/pdo_pgsql_bug44173_php_5.3_v2.patch

------------------------------------------------------------------------

[2009-03-22 17:59:16] matteo at beccati dot com

Fix is available here:

http://www.beccati.com/misc/php/pdo_pgsql_bug44173_php_5.3.patch

------------------------------------------------------------------------

[2008-02-19 16:25:01] uwendel at mysql dot com

And a last one...


[7] PDO->query('SELECT....', PDO::FETCH_CLASS) -> proper error message

nixn...@ulflinux:~/php53> sapi/cli/php -r 'error_reporting(E_ALL);
$pdo=new PDO("sqlite:/tmp/foo.db");
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
@$pdo->exec("DROP TABLE test"); $pdo->exec("CREATE TABLE test(id INT)");
$pdo->exec("INSERT INTO test(id) VALUES (1)");
var_dump($pdo->query("SELECT id FROM test", PDO::FETCH_CLASS,
"unknown"));'

Warning: PDO::query(): SQLSTATE[]: <<Unknown error>> in Command line
code on line 1
bool(false)


I have not checked other error modes of PDO. I do not know if PDO shall
raise an exception for every warning it prints, if that's intended at
all.

------------------------------------------------------------------------

[2008-02-19 16:21:04] uwendel at mysql dot com

[6] PDO->query("SELECT", PDO::FETCH_COLUMN) -> error message could be
better

nixn...@ulflinux:~/php53> sapi/cli/php -r 'error_reporting(E_ALL);
$pdo=new PDO("sqlite:/tmp/foo.db");
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
@$pdo->exec("DROP TABLE test"); $pdo->exec("CREATE TABLE test(id INT)");
$pdo->exec("INSERT INTO test(id) VALUES (1)");
var_dump($pdo->query("SELECT id FROM test", PDO::FETCH_COLUMN));'

Warning: PDO::query(): SQLSTATE[]: <<Unknown error>> in Command line
code on line 1
bool(false)

------------------------------------------------------------------------

[2008-02-19 16:18:07] uwendel at mysql dot com

[5] PDO->query('SELECT ...', PDO::FETCH_INTO) -> no proper error
message

nixn...@ulflinux:~/php53> sapi/cli/php -r 'error_reporting(E_ALL);
$pdo=new PDO("sqlite:/tmp/foo.db");
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
@$pdo->exec("DROP TABLE test"); $pdo->exec("CREATE TABLE test(id INT)");
$pdo->exec("INSERT INTO test(id) VALUES (1)");
var_dump($pdo->query("SELECT id FROM test", PDO::FETCH_INTO));'

Warning: PDO::query(): SQLSTATE[]: <<Unknown error>> in Command line
code on line 1
bool(false)

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/44173

-- 
Edit this bug report at http://bugs.php.net/?id=44173&edit=1

Reply via email to