zend_declare_property_long(error_exception_ce, "severity", sizeof("severity")-1, E_ERROR, ZEND_ACC_PROTECTED TSRMLS_CC);
}
-ZEND_API zend_class_entry *zend_exception_get_default(void)
+ZEND_API zend_class_entry *zend_exception_get_default(TSRMLS_D)
{
return U_CLASS_ENTRY(default_exception_ce);
}
-ZEND_API zend_class_entry *zend_get_error_exception(void)
+ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D)
{
return U_CLASS_ENTRY(error_exception_ce);
}
void zend_register_default_exception(TSRMLS_D);
-ZEND_API zend_class_entry *zend_exception_get_default(void);
-ZEND_API zend_class_entry *zend_get_error_exception(void);
+ZEND_API zend_class_entry *zend_exception_get_default(TSRMLS_D);
+ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D);
ZEND_API void zend_register_default_classes(TSRMLS_D);
/* exception_ce NULL or zend_exception_get_default() or a derived class
reflection_object_handlers.write_property = _reflection_write_property;
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", reflection_exception_functions);
- reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(), NULL TSRMLS_CC);
+ reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
INIT_CLASS_ENTRY(_reflection_entry, "Reflection", reflection_functions);
reflection_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);
php_com_persist_minit(INIT_FUNC_ARGS_PASSTHRU);
INIT_CLASS_ENTRY(ce, "com_exception", NULL);
- php_com_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
+ php_com_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
php_com_exception_class_entry->ce_flags |= ZEND_ACC_FINAL;
/* php_com_exception_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED; */
zend_hash_init(&classes, 0, NULL, NULL, 1);
INIT_CLASS_ENTRY(ce, "DOMException", php_dom_domexception_class_functions);
- dom_domexception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
+ dom_domexception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
dom_domexception_class_entry->ce_flags |= ZEND_ACC_FINAL;
zend_declare_property_long(dom_domexception_class_entry, "code", sizeof("code")-1, 0, ZEND_ACC_PUBLIC TSRMLS_CC);
* single value is an array. Also we'd have to make that one
* argument passed by reference.
*/
- zend_throw_exception(zend_exception_get_default(), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
+ zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
return;
}
} else {
fcc.object_pp = &return_value;
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Could not execute %v::%v()", ce->name, ce->constructor->common.function_name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %v::%v()", ce->name, ce->constructor->common.function_name);
} else {
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
efree(fci.params);
}
} else if (ctor_params) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Class %v does not have a constructor hence you cannot use ctor_params", ce->name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %v does not have a constructor hence you cannot use ctor_params", ce->name);
}
}
}
#ifdef HAVE_SPL
mysqli_exception_class_entry = zend_register_internal_class_ex(&cex, spl_ce_RuntimeException, NULL TSRMLS_CC);
#else
- mysqli_exception_class_entry = zend_register_internal_class_ex(&cex, zend_exception_get_default(), NULL TSRMLS_CC);
+ mysqli_exception_class_entry = zend_register_internal_class_ex(&cex, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
#endif
mysqli_exception_class_entry->ce_flags |= ZEND_ACC_FINAL;
zend_declare_property_long(mysqli_exception_class_entry, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED TSRMLS_CC);
* single value is an array. Also we'd have to make that one
* argument passed by reference.
*/
- zend_throw_exception(zend_exception_get_default(), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
+ zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
return;
}
} else {
fcc.object_pp = &return_value;
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
} else {
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
efree(fci.params);
}
} else if (ctor_params) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
}
}
}
{
MyG(report_mode) = Z_LVAL_P(value);
php_set_error_handling(MyG(report_mode) & MYSQLI_REPORT_STRICT ? EH_THROW : EH_NORMAL,
- zend_exception_get_default() TSRMLS_CC);
+ zend_exception_get_default(TSRMLS_C) TSRMLS_CC);
return SUCCESS;
}
/* }}} */
* single value is an array. Also we'd have to make that one
* argument passed by reference.
*/
- zend_throw_exception(zend_exception_get_default(), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
+ zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
return;
}
} else {
fcc.object_pp = &return_value;
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
} else {
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
efree(fci.params);
}
} else if (ctor_params) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
}
}
}
reflection_object_handlers.write_property = _reflection_write_property;
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", reflection_exception_functions);
- reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(), NULL TSRMLS_CC);
+ reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
INIT_CLASS_ENTRY(_reflection_entry, "Reflection", reflection_functions);
reflection_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);
#define SIMPLEXML_G(v) (simplexml_globals.v)
#endif
-ZEND_API zend_class_entry *sxe_get_element_class_entry();
+ZEND_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D);
#endif
zend_class_entry *sxe_class_entry = NULL;
-ZEND_API zend_class_entry *sxe_get_element_class_entry()
+ZEND_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D)
{
return U_CLASS_ENTRY(sxe_class_entry);
}
int data_len;
xmlDocPtr docp;
- php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC);
+ php_set_error_handling(EH_THROW, zend_exception_get_default(TSRMLS_C) TSRMLS_CC);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &data, &data_len) == FAILURE) {
php_std_error_handling();
return;
docp = xmlParseMemory(data, data_len);
if (!docp) {
((php_libxml_node_object *)sxe)->document = NULL;
- zend_throw_exception(zend_exception_get_default(), "String could not be parsed as XML", 0 TSRMLS_CC);
+ zend_throw_exception(zend_exception_get_default(TSRMLS_C), "String could not be parsed as XML", 0 TSRMLS_CC);
return;
}
/* Register SoapFault class */
INIT_CLASS_ENTRY(ce, PHP_SOAP_FAULT_CLASSNAME, soap_fault_functions);
#ifdef ZEND_ENGINE_2
- soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
+ soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
#else
soap_fault_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
#endif
PHPAPI zend_class_entry *spl_ce_UnderflowException;
PHPAPI zend_class_entry *spl_ce_UnexpectedValueException;
-#define spl_ce_Exception zend_exception_get_default()
+#define spl_ce_Exception zend_exception_get_default(TSRMLS_C)
/* {{{ PHP_MINIT_FUNCTION(spl_exceptions) */
PHP_MINIT_FUNCTION(spl_exceptions)
break;
}
- php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC);
+ php_set_error_handling(EH_THROW, zend_exception_get_default(TSRMLS_C) TSRMLS_CC);
zobject->refcount++;
intern->inner.zobject = zobject;
SPL_API PHP_MINIT_FUNCTION(spl_sxe) /* {{{ */
{
- zend_class_entry *spl_ce_SimpleXML_Element = sxe_get_element_class_entry();
+ zend_class_entry *spl_ce_SimpleXML_Element = sxe_get_element_class_entry(TSRMLS_C);
if (!spl_ce_SimpleXML_Element) {
return SUCCESS; /* SimpleXML must be initialized before */
}
if (!dbh->methods) {
- zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC, "SQLSTATE[%s] [%d] %s",
+ zend_throw_exception_ex(php_pdo_get_exception(TSRMLS_C), 0 TSRMLS_CC, "SQLSTATE[%s] [%d] %s",
*pdo_err, einfo->errcode, einfo->errmsg);
}
filename = make_filename_safe(dbh->data_source TSRMLS_CC);
if (!filename) {
- zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC,
+ zend_throw_exception_ex(php_pdo_get_exception(TSRMLS_C), 0 TSRMLS_CC,
"safe_mode/open_basedir prohibits opening %s",
dbh->data_source);
goto cleanup;
#if defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1))
REGISTER_SQLITE_CLASS(Exception, exception, spl_ce_RuntimeException);
#else
- REGISTER_SQLITE_CLASS(Exception, exception, zend_exception_get_default());
+ REGISTER_SQLITE_CLASS(Exception, exception, zend_exception_get_default(TSRMLS_C));
#endif
sqlite_ce_db->ce_flags &= ~ZEND_ACC_FINAL_CLASS;
REGISTER_TIDY_CLASS(tidy, doc, NULL, 0);
REGISTER_TIDY_CLASS(tidyNode, node, NULL, ZEND_ACC_FINAL_CLASS);
/* no exceptions for now..
- REGISTER_TIDY_CLASS(tidyException, exception, zend_exception_get_default());
+ REGISTER_TIDY_CLASS(tidyException, exception, zend_exception_get_default(TSRMLS_C));
*/
tidy_object_handlers_doc.get_class_entry = tidy_get_ce_doc;
tidy_object_handlers_node.get_class_entry = tidy_get_ce_node;