Skip to content

Instantly share code, notes, and snippets.

@sotarok
Created September 4, 2011 16:11
Show Gist options
  • Save sotarok/1193083 to your computer and use it in GitHub Desktop.
Save sotarok/1193083 to your computer and use it in GitHub Desktop.
Degraded https://bugs.php.net/bug.php?id=54384 but enable extend SPL internal classes.
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -889,10 +889,12 @@ static void construction_wrapper(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */
}
goto cleanup;
}
+ /*
if (!EG(exception) && SPL_G(validating_fun)(object_data TSRMLS_CC) == 0)
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC,
"In the constructor of %s, parent::__construct() must be called "
"and its exceptions cannot be cleared", this_ce->name);
+ */
cleanup:
/* no need to cleanup zf, zend_std_get_constructor never allocates a new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment