Bug #66658 [NEW]: wrong pg_result_error() result

From: Date: Fri, 07 Feb 2014 09:10:01 +0000
Subject: Bug #66658 [NEW]: wrong pg_result_error() result
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184193@lists.php.net to get a copy of this message
From:             tap3ahchina at gmail dot com
Operating system: Fedora Linux 3.12.9-301.fc20.x86
PHP version:      5.5.9
Package:          SPL related
Bug Type:         Bug
Bug description:wrong pg_result_error() result

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 bug report at https://bugs.php.net/bug.php?id=66658&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=66658&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=66658&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=66658&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=66658&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=66658&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=66658&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=66658&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=66658&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=66658&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=66658&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=66658&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=66658&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=66658&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66658&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=66658&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=66658&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=66658&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66658&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=66658&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=66658&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#184193) next »