com php-src: Fixed bug #65336: NEWS ext/pgsql/pgsql.c
| From: | Yasuo Ohgaki | Date: | Fri, 26 Jul 2013 20:54:09 +0000 |
| Subject: | com php-src: Fixed bug #65336: NEWS ext/pgsql/pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-72759@lists.php.net to get a copy of this message | ||
Commit: 1d7b6970f20a059c501e68927c9fb874bdb226bc
Author: Yasuo Ohgaki <yohgaki@php.net> Sat, 27 Jul 2013 05:46:11 +0900
Parents: fd616ba50f11f13483f46b1d64d90f0d6e91cfac
Branches: PHP-5.4
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1d7b6970f20a059c501e68927c9fb874bdb226bc
Log:
Fixed bug #65336
Bugs:
https://bugs.php.net/65336
Changed paths:
M NEWS
M ext/pgsql/pgsql.c
Diff:
diff --git a/NEWS b/NEWS
index 8f7bbd8..97c25df 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,10 @@ PHP NEWS
. Fixed bug #65028 (Phar::buildFromDirectory creates corrupt archives for
some specific contents). (Stas)
+- Pgsql:
+ . Fixed bug #65336 (pg_escape_literal/identifier() scilently returns false).
+ (Yasuo)
+
?? ??? 2013, PHP 5.4.18
- Core:
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 1b30266..796d883 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -4294,12 +4294,13 @@ static void php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAMETERS, int
escape_l
}
if (pgsql_link == NULL && id == -1) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot get default pgsql link");
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link,
le_plink);
if (pgsql == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot get default pgsql link");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot get pgsql link");
RETURN_FALSE;
}
#ifdef HAVE_PQESCAPELITERAL