Skip to content

Commit ff96f25

Browse files
committed
Revert "Fix bug #62397 - disable_functions does not work with eval."
This reverts commit 050d299.
1 parent f349d79 commit ff96f25

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

Zend/tests/errmsg_046.phpt

Lines changed: 0 additions & 14 deletions
This file was deleted.

Zend/zend_API.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2757,12 +2757,6 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_lengt
27572757

27582758
/* Disabled functions support */
27592759

2760-
static ZEND_COLD zend_op_array *display_disabled_compile_string(zval *source_string, char *filename)
2761-
{
2762-
zend_error(E_WARNING, "eval() has been disabled for security reasons");
2763-
return NULL;
2764-
}
2765-
27662760
/* {{{ proto void display_disabled_function(void)
27672761
Dummy function which displays an error when a disabled function is called. */
27682762
ZEND_API ZEND_COLD ZEND_FUNCTION(display_disabled_function)
@@ -2774,12 +2768,6 @@ ZEND_API ZEND_COLD ZEND_FUNCTION(display_disabled_function)
27742768
ZEND_API int zend_disable_function(char *function_name, size_t function_name_length) /* {{{ */
27752769
{
27762770
zend_internal_function *func;
2777-
2778-
if (strcmp(function_name, "eval") == 0) {
2779-
zend_compile_string = display_disabled_compile_string;
2780-
return SUCCESS;
2781-
}
2782-
27832771
if ((func = zend_hash_str_find_ptr(CG(function_table), function_name, function_name_length))) {
27842772
func->fn_flags &= ~(ZEND_ACC_VARIADIC | ZEND_ACC_HAS_TYPE_HINTS | ZEND_ACC_HAS_RETURN_TYPE);
27852773
func->num_args = 0;

0 commit comments

Comments
 (0)