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

 ID:                 52978
 Updated by:         ahar...@php.net
 Reported by:        tepkeev at gmail dot com
 Summary:            setAttribute doesn`t raise an error
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            PDO related
 Operating System:   MacOS 10.6.4
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

PDO::CASE_NATURAL is simply an integer constant -- 0, in this case. That
is actually a valid value for setting the PDO::ATTR_ERRMODE attribute --
it's the same as PDO::ERRMODE_SILENT.


Previous Comments:
------------------------------------------------------------------------
[2010-10-03 12:25:53] tepkeev at gmail dot com

Description:
------------
PDO::setAttribute must raise an error if an incorrect value is passed
for the 

attribute but it doesn`t, see example

Test script:
---------------
$pdo = new \PDO('mysql:host=127.0.0.1;dbname=db', 'login', 'pass');

$pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::CASE_NATURAL);

Expected result:
----------------
Warning: Incorrect value for PDO::ATTR_ERRMODE

Actual result:
--------------
nothing - just empty screen


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



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

Reply via email to