From: j dot gizmo at aon dot at Operating system: Windows 2000 PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: PDO code samples
Description: ------------ In code samples for the PDO object, objects are created with the assignment operator (=) instead of the reference operator (=&). Reproduce code: --------------- //Syntax used in code samples $conn = new PDO( $dsn ); //How it actually works $conn =& new PDO( $dsn ); Expected result: ---------------- The output shown below the corresponding code samples. Actual result: -------------- On windows, the first version doesn't report any errors, however any subsequent calls to methods of $conn results in the following warning: "SQL State [000000] No Error. PDO Constructor was not called." If you use the =& operator (and make $conn a reference to the newly created object) everything works as expected. -- Edit bug report at http://bugs.php.net/?id=35932&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35932&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35932&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35932&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35932&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35932&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35932&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35932&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35932&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35932&r=support Expected behavior: http://bugs.php.net/fix.php?id=35932&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35932&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35932&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35932&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35932&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35932&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35932&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35932&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35932&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35932&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35932&r=mysqlcfg
