Skip to content

Commit b117209

Browse files
committed
Increase error for garbage passed to unserialize() from Notice to Warning
1 parent a6cd0ac commit b117209

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/var.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ PHPAPI void php_unserialize_with_options(zval *return_value, const char *buf, co
14011401
}
14021402
if (!php_var_unserialize(retval, &p, p + buf_len, &var_hash)) {
14031403
if (!EG(exception)) {
1404-
php_error_docref(NULL, E_NOTICE, "Error at offset " ZEND_LONG_FMT " of %zd bytes",
1404+
php_error_docref(NULL, E_WARNING, "Error at offset " ZEND_LONG_FMT " of %zd bytes",
14051405
(zend_long)((char*)p - buf), buf_len);
14061406
}
14071407
if (BG(unserialize).level <= 1) {

0 commit comments

Comments
 (0)