- MFH: Fixed bug #47048 (Segfault with new pg_meta_data)

This commit is contained in:
Felipe Pena 2009-01-18 23:49:31 +00:00
parent b83859120d
commit e77326faba

View file

@ -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";