@ -1352,6 +1352,9 @@ PHP_FUNCTION(stristr)
if (Z_TYPE_PP(needle) == IS_STRING) {
if (!Z_STRLEN_PP(needle)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter.");
efree(haystack_orig);
zval_ptr_dtor(haystack);
zval_ptr_dtor(needle);
RETURN_FALSE;
}