diff options
author | Felipe Pena <felipe@php.net> | 2009-01-18 23:49:31 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2009-01-18 23:49:31 +0000 |
commit | e77326fabaa6952ba9660bc3e34b57c3351bb0a6 (patch) | |
tree | 92d4ee31e207ebad4e32f91440b974e91c0c4d15 /ext/pgsql | |
parent | b83859120df49078dc5bef1b7e3b0bea60c47dec (diff) | |
download | php-git-e77326fabaa6952ba9660bc3e34b57c3351bb0a6.tar.gz |
- MFH: Fixed bug #47048 (Segfault with new pg_meta_data)
Diffstat (limited to 'ext/pgsql')
-rw-r--r-- | ext/pgsql/pgsql.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index a4a5b0d2a9..5b6e3c881a 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -4831,7 +4831,7 @@ PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, z src = estrdup(table_name); tmp_name = php_strtok_r(src, ".", &tmp_name2); - if (!*tmp_name2) { + if (!tmp_name2 || !*tmp_name2) { /* Default schema */ tmp_name2 = tmp_name; tmp_name = "public"; |