Edit report at https://bugs.php.net/bug.php?id=66658&edit=1
ID: 66658
Updated by: yohgaki@php.net
Reported by: tap3ahchina at gmail dot com
Summary: wrong pg_result_error() result
Status: Assigned
-Type: Feature/Change Request
+Type: Documentation Problem
Package: PostgreSQL related
Operating System: Fedora Linux 3.12.9-301.fc20.x86
PHP Version: 5.5.9
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
I didn't know documentation is wrong. Thanks.
Previous Comments:
------------------------------------------------------------------------
[2014-03-13 18:20:18] tap3ahchina at gmail dot com
No reason really. Documentation is incorrect, that's all. Change either behavior or
documentation.
------------------------------------------------------------------------
[2014-03-11 03:16:44] yohgaki@php.net
I'm not sure if we should change this behavior. Anyone have good reason for it?
------------------------------------------------------------------------
[2014-02-07 09:10:00] tap3ahchina at gmail dot com
Description:
------------
Build: PHP 5.5.8 (cli) (built: Jan 9 2014 08:33:30)
Documentation for pg_result_error states:
"Returns a string if there is an error associated with the result parameter, FALSE
otherwise."
but empty String ("") is returned.
Test script:
---------------
$conn = pg_pconnect("host=... port=5432 dbname=myDB user='postgres'
password='...'");
pg_send_query($conn, "SELECT count(*) FROM existingTable;");
$ress = pg_get_result($conn);
$errmsg = pg_result_error($ress);
var_dump($errmsg);
Expected result:
----------------
bool(false)
Actual result:
--------------
string(0) ""
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66658&edit=1