Skip to content

Instantly share code, notes, and snippets.

@dstogov
Created December 9, 2019 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dstogov/4fc42c5e64308a1d9be2e9bd18033d05 to your computer and use it in GitHub Desktop.
Save dstogov/4fc42c5e64308a1d9be2e9bd18033d05 to your computer and use it in GitHub Desktop.
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index d3bf032c10..6f496bb4cd 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1553,6 +1553,11 @@ ZEND_FUNCTION(class_alias)
return;
}
+ if (CG(compiler_options) & ZEND_COMPILE_PRELOAD) {
+ zend_error_noreturn(E_ERROR, "class_alias() is not supported in preloading scenarios");
+ RETURN_FALSE;
+ }
+
ce = zend_lookup_class_ex(class_name, NULL, !autoload ? ZEND_FETCH_CLASS_NO_AUTOLOAD : 0);
if (ce) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment