#44308 [NEW]: pg_set_client_encoding example uses constant instead of string

From: Date: Sun, 02 Mar 2008 08:20:29 +0000
Subject: #44308 [NEW]: pg_set_client_encoding example uses constant instead of string
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-562@lists.php.net to get a copy of this message
From: tokul at users dot sourceforge dot net Operating system: PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: pg_set_client_encoding example uses constant instead of string Description: ------------ In http://www.php.net/pg_set_client_encoding first example uses UNICODE constant instead of string. Such call causes "Use of undefined constant UNICODE - assumed 'UNICODE' in ..." notice. Reproduce code: --------------- $conn = pg_connect("dbname=publisher"); if (!$conn) { die("An error occured.\n"); } pg_set_client_encoding($conn, UNICODE); pg_close($conn); Expected result: ---------------- No output in PHP error_reporting=E_ALL environment Actual result: -------------- E_NOTICE -- Edit bug report at http://bugs.php.net/?id=44308&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44308&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44308&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44308&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44308&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44308&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44308&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44308&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44308&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44308&r=support Expected behavior: http://bugs.php.net/fix.php?id=44308&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44308&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44308&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44308&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44308&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44308&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44308&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44308&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44308&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44308&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44308&r=mysqlcfg

« previous php.doc.bugs (#562) next »