php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #44308 pg_set_client_encoding example uses constant instead of string
Submitted: 2008-03-02 08:20 UTC Modified: 2008-11-07 11:29 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tokul at users dot sourceforge dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2008-03-02 08:20 UTC] tokul at users dot sourceforge dot net
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-07 11:29 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 19:00:01 2026 UTC