allow empty prefix (restore 5_2 behavior)

This commit is contained in:
Antony Dovgal 2007-08-10 12:54:38 +00:00
parent 28cf1788a9
commit c13e337f27

View File

@ -1417,7 +1417,7 @@ PHP_FUNCTION(extract)
if (prefix) {
convert_to_text(prefix);
if (!Z_UNILEN_P(prefix) || !php_valid_var_name(Z_UNIVAL_P(prefix), Z_UNILEN_P(prefix), Z_TYPE_P(prefix))) {
if (Z_UNILEN_P(prefix) && !php_valid_var_name(Z_UNIVAL_P(prefix), Z_UNILEN_P(prefix), Z_TYPE_P(prefix))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "prefix is not a valid identifier");
return;
}