Remove INPUT_SESSION and INPUT_REQUEST

These were never supported and always generated a warning. Remove
them entirely for PHP 8.
This commit is contained in:
Nikita Popov 2019-07-08 10:49:34 +02:00
parent 8aa6d5a0ea
commit 0904dd3dc2
3 changed files with 8 additions and 10 deletions

View File

@ -91,6 +91,9 @@ PHP 8.0 UPGRADE NOTES
. The FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED flags for the
FILTER_VALIDATE_URL filter have been removed. The scheme and host are (and
have been) always required.
. The INPUT_REQUEST and INPUT_SESSION source for filter_input() etc have been
removed. These were never implemented and their use always generated a
warning.
- GD:
. The deprecated function image2wbmp() has been removed.

View File

@ -222,8 +222,6 @@ PHP_MINIT_FUNCTION(filter)
REGISTER_LONG_CONSTANT("INPUT_COOKIE", PARSE_COOKIE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("INPUT_ENV", PARSE_ENV, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("INPUT_SERVER", PARSE_SERVER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("INPUT_SESSION", PARSE_SESSION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("INPUT_REQUEST", PARSE_REQUEST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FILTER_FLAG_NONE", FILTER_FLAG_NONE, CONST_CS | CONST_PERSISTENT);
@ -549,13 +547,8 @@ static zval *php_filter_get_storage(zend_long arg)/* {{{ */
}
array_ptr = !Z_ISUNDEF(IF_G(env_array)) ? &IF_G(env_array) : &PG(http_globals)[TRACK_VARS_ENV];
break;
case PARSE_SESSION:
/* FIXME: Implement session source */
php_error_docref(NULL, E_WARNING, "INPUT_SESSION is not yet implemented");
break;
case PARSE_REQUEST:
/* FIXME: Implement request source */
php_error_docref(NULL, E_WARNING, "INPUT_REQUEST is not yet implemented");
default:
php_error_docref(NULL, E_WARNING, "Unknown source");
break;
}

View File

@ -21,7 +21,7 @@ var_dump(filter_has_var(0, "cc"));
echo "Done\n";
?>
--EXPECT--
--EXPECTF--
bool(false)
bool(true)
bool(true)
@ -29,6 +29,8 @@ bool(true)
bool(true)
bool(false)
bool(false)
Warning: filter_has_var(): Unknown source in %s on line %d
bool(false)
bool(false)
Done