Skip to content

Commit 1d7b697

Browse files
author
Yasuo Ohgaki
committed
Fixed bug #65336
1 parent fd616ba commit 1d7b697

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ PHP NEWS
2121
. Fixed bug #65028 (Phar::buildFromDirectory creates corrupt archives for
2222
some specific contents). (Stas)
2323

24+
- Pgsql:
25+
. Fixed bug #65336 (pg_escape_literal/identifier() scilently returns false).
26+
(Yasuo)
27+
2428
?? ??? 2013, PHP 5.4.18
2529

2630
- Core:

ext/pgsql/pgsql.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4294,12 +4294,13 @@ static void php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAMETERS, int escape_l
42944294
}
42954295

42964296
if (pgsql_link == NULL && id == -1) {
4297+
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot get default pgsql link");
42974298
RETURN_FALSE;
42984299
}
42994300

43004301
ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink);
43014302
if (pgsql == NULL) {
4302-
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot get default pgsql link");
4303+
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Cannot get pgsql link");
43034304
RETURN_FALSE;
43044305
}
43054306
#ifdef HAVE_PQESCAPELITERAL

0 commit comments

Comments
 (0)