diff options
author | Marc Boeren <mboeren@php.net> | 2002-10-30 12:02:51 +0000 |
---|---|---|
committer | Marc Boeren <mboeren@php.net> | 2002-10-30 12:02:51 +0000 |
commit | 7b9eae0e6eb2f180d8c727493d4730a7951af891 (patch) | |
tree | b597873f2a3077bd78df2099aff9a6b93e3a4386 /ext/dbx/dbx_pgsql.c | |
parent | 939a5870cff702d00ab06ecd1448d46aca0ea58a (diff) | |
download | php-git-7b9eae0e6eb2f180d8c727493d4730a7951af891.tar.gz |
escape_string functions will now return empty string directly.
Diffstat (limited to 'ext/dbx/dbx_pgsql.c')
-rw-r--r-- | ext/dbx/dbx_pgsql.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/dbx/dbx_pgsql.c b/ext/dbx/dbx_pgsql.c index c8cac1908c..7642ee6488 100644 --- a/ext/dbx/dbx_pgsql.c +++ b/ext/dbx/dbx_pgsql.c @@ -285,6 +285,10 @@ int dbx_pgsql_esc(zval **rv, zval **dbx_handle, zval **string, INTERNAL_FUNCTION char * tmpstr; int tmplen; + if (Z_STRLEN_PP(string) == 0) { + ZVAL_EMPTY_STRING(*rv); + return 1; + } tmpstr = estrdup(Z_STRVAL_PP(string)); tmplen = Z_STRLEN_PP(string); /* php_str_to_str uses a smart_str that allocates memory */ |