/** * Produces a recursive representation of an array * * @param array $argument * @return string */ PHP_METHOD(Phalcon_Debug, _getArrayDump){ zval *argument, *n = NULL, *number_arguments, *one, *dump; zval *v = NULL, *k = NULL, *var_dump = NULL, *escaped_string = NULL, *next = NULL, *array_dump = NULL; zval *class_name = NULL, *joined_dump; HashTable *ah0; HashPosition hp0; zval **hd; PHALCON_MM_GROW(); phalcon_fetch_params(1, 1, 1, &argument, &n); if (!n) { PHALCON_INIT_VAR(n); ZVAL_LONG(n, 0); } PHALCON_INIT_VAR(number_arguments); phalcon_fast_count(number_arguments, argument TSRMLS_CC); if (PHALCON_LT_LONG(n, 3)) { if (PHALCON_GT_LONG(number_arguments, 0)) { if (PHALCON_LT_LONG(number_arguments, 10)) { PHALCON_INIT_VAR(one); ZVAL_LONG(one, 1); PHALCON_INIT_VAR(dump); array_init(dump); phalcon_is_iterable(argument, &ah0, &hp0, 0, 0); while (zend_hash_get_current_data_ex(ah0, (void**) &hd, &hp0) == SUCCESS) { PHALCON_GET_HKEY(k, ah0, hp0); PHALCON_GET_HVALUE(v); if (PHALCON_IS_SCALAR(v)) { if (PHALCON_IS_STRING(v, "")) { PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVS(var_dump, "[", k, "] => (empty string)"); } else { PHALCON_INIT_NVAR(escaped_string); phalcon_call_method_p1(escaped_string, this_ptr, "_escapestring", v); PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVSV(var_dump, "[", k, "] => ", escaped_string); } phalcon_array_append(&dump, var_dump, PH_SEPARATE); } else { if (Z_TYPE_P(v) == IS_ARRAY) { PHALCON_INIT_NVAR(next); phalcon_add_function(next, n, one TSRMLS_CC); PHALCON_INIT_NVAR(array_dump); phalcon_call_method_p2(array_dump, this_ptr, "_getarraydump", v, next); PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVSVS(var_dump, "[", k, "] => Array(", array_dump, ")"); phalcon_array_append(&dump, var_dump, PH_SEPARATE); zend_hash_move_forward_ex(ah0, &hp0); continue; } if (Z_TYPE_P(v) == IS_OBJECT) { PHALCON_INIT_NVAR(class_name); phalcon_get_class(class_name, v, 0 TSRMLS_CC); PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVSVS(var_dump, "[", k, "] => Object(", class_name, ")"); phalcon_array_append(&dump, var_dump, PH_SEPARATE); zend_hash_move_forward_ex(ah0, &hp0); continue; } if (Z_TYPE_P(v) == IS_NULL) { PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVS(var_dump, "[", k, "] => null"); phalcon_array_append(&dump, var_dump, PH_SEPARATE); zend_hash_move_forward_ex(ah0, &hp0); continue; } PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVSV(var_dump, "[", k, "] => ", v); phalcon_array_append(&dump, var_dump, PH_SEPARATE); } zend_hash_move_forward_ex(ah0, &hp0); } PHALCON_INIT_VAR(joined_dump); phalcon_fast_join_str(joined_dump, SL(", "), dump TSRMLS_CC); RETURN_CTOR(joined_dump); } RETURN_NCTOR(number_arguments); } } RETURN_MM_NULL(); }
/** * Rollbacks the active transaction in the connection * * @param boolean $nesting * @return boolean */ PHP_METHOD(Phalcon_Db_Adapter_Pdo, rollback){ zval *nesting = NULL, *pdo, *transaction_level, *events_manager = NULL; zval *event_name = NULL, *ntw_savepoint = NULL, *savepoint_name = NULL; PHALCON_MM_GROW(); phalcon_fetch_params(1, 0, 1, &nesting); if (!nesting) { nesting = PHALCON_GLOBAL(z_true); } pdo = phalcon_fetch_nproperty_this(this_ptr, SL("_pdo"), PH_NOISY TSRMLS_CC); if (Z_TYPE_P(pdo) != IS_OBJECT) { RETURN_MM_FALSE; } /** * Check the transaction nesting level */ transaction_level = phalcon_fetch_nproperty_this(this_ptr, SL("_transactionLevel"), PH_NOISY TSRMLS_CC); if (!zend_is_true(transaction_level)) { PHALCON_THROW_EXCEPTION_STR(phalcon_db_exception_ce, "There is no active transaction"); return; } if (PHALCON_IS_LONG(transaction_level, 1)) { events_manager = phalcon_fetch_nproperty_this(this_ptr, SL("_eventsManager"), PH_NOISY TSRMLS_CC); /** * Notify the events manager about the rollbacked transaction */ if (Z_TYPE_P(events_manager) == IS_OBJECT) { PHALCON_INIT_VAR(event_name); ZVAL_STRING(event_name, "db:rollbackTransaction", 1); PHALCON_CALL_METHOD(NULL, events_manager, "fire", event_name, this_ptr); } /** * Reduce the transaction nesting level */ phalcon_property_decr(this_ptr, SL("_transactionLevel") TSRMLS_CC); PHALCON_RETURN_CALL_METHOD(pdo, "rollback"); RETURN_MM(); } if (zend_is_true(transaction_level)) { if (zend_is_true(nesting)) { PHALCON_CALL_METHOD(&ntw_savepoint, this_ptr, "isnestedtransactionswithsavepoints"); if (zend_is_true(ntw_savepoint)) { events_manager = phalcon_fetch_nproperty_this(this_ptr, SL("_eventsManager"), PH_NOISY TSRMLS_CC); PHALCON_CALL_METHOD(&savepoint_name, this_ptr, "getnestedtransactionsavepointname"); /** * Notify the events manager about the rollbacked savepoint */ if (Z_TYPE_P(events_manager) == IS_OBJECT) { PHALCON_INIT_NVAR(event_name); ZVAL_STRING(event_name, "db:rollbackSavepoint", 1); PHALCON_CALL_METHOD(NULL, events_manager, "fire", event_name, this_ptr, savepoint_name); } /** * Reduce the transaction nesting level */ phalcon_property_decr(this_ptr, SL("_transactionLevel") TSRMLS_CC); PHALCON_RETURN_CALL_METHOD(this_ptr, "rollbacksavepoint", savepoint_name); RETURN_MM(); } } } /** * Reduce the transaction nesting level */ if (PHALCON_GT_LONG(transaction_level, 0)) { phalcon_property_decr(this_ptr, SL("_transactionLevel") TSRMLS_CC); } RETURN_MM_FALSE; }
/** * Produces a recursive representation of an array * * @param array $argument * @return string */ PHP_METHOD(Phalcon_Debug, _getArrayDump) { zval *argument, *n = NULL, *number_arguments, *dump; zval *v = NULL, *var_dump = NULL, *escaped_string = NULL, *next = NULL, *array_dump = NULL; zval *class_name = NULL, *joined_dump; zend_string *str_key; ulong idx; PHALCON_MM_GROW(); phalcon_fetch_params(0, 1, 1, &argument, &n); if (!n) { PHALCON_INIT_VAR(n); ZVAL_LONG(n, 0); } PHALCON_INIT_VAR(number_arguments); phalcon_fast_count(number_arguments, argument); if (PHALCON_LT_LONG(n, 3)) { if (PHALCON_GT_LONG(number_arguments, 0)) { if (PHALCON_LT_LONG(number_arguments, 10)) { PHALCON_INIT_VAR(dump); array_init(dump); ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(argument), idx, str_key, v) { zval tmp; if (str_key) { ZVAL_STR(&tmp, str_key); } else { ZVAL_LONG(&tmp, idx); } if (PHALCON_IS_SCALAR(v)) { if (PHALCON_IS_STRING(v, "")) { PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVS(var_dump, "[", &tmp, "] => (empty string)"); } else { PHALCON_CALL_METHOD(&escaped_string, getThis(), "_escapestring", v); PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVSV(var_dump, "[", &tmp, "] => ", escaped_string); } phalcon_array_append(dump, var_dump, PH_COPY); } else { if (Z_TYPE_P(v) == IS_ARRAY) { PHALCON_INIT_NVAR(next); phalcon_add_function(next, n, &PHALCON_GLOBAL(z_one)); PHALCON_CALL_METHOD(&array_dump, getThis(), "_getarraydump", v, next); PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVSVS(var_dump, "[", &tmp, "] => Array(", array_dump, ")"); phalcon_array_append(dump, var_dump, PH_COPY); continue; } if (Z_TYPE_P(v) == IS_OBJECT) { zend_class_entry *ce = Z_OBJCE_P(v); PHALCON_INIT_NVAR(class_name); ZVAL_NEW_STR(class_name, ce->name); PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVSVS(var_dump, "[", &tmp, "] => Object(", class_name, ")"); phalcon_array_append(dump, var_dump, PH_COPY); continue; } if (Z_TYPE_P(v) == IS_NULL) { PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVS(var_dump, "[", &tmp, "] => null"); phalcon_array_append(dump, var_dump, PH_COPY); continue; } PHALCON_INIT_NVAR(var_dump); PHALCON_CONCAT_SVSV(var_dump, "[", &tmp, "] => ", v); phalcon_array_append(dump, var_dump, PH_COPY); } } ZEND_HASH_FOREACH_END(); PHALCON_INIT_VAR(joined_dump); phalcon_fast_join_str(joined_dump, SL(", "), dump); RETURN_CTOR(joined_dump); } RETURN_NCTOR(number_arguments); }
/** * Commits the active transaction in the connection * * @param boolean $nesting * @return boolean */ PHP_METHOD(Phalcon_Db_Adapter_Pdo, commit){ zval *nesting = NULL, *pdo, *transaction_level, *events_manager = NULL; zval *event_name = NULL, *ntw_savepoint, *savepoint_name; PHALCON_MM_GROW(); phalcon_fetch_params(1, 0, 1, &nesting); if (!nesting) { PHALCON_INIT_VAR(nesting); ZVAL_BOOL(nesting, 1); } PHALCON_OBS_VAR(pdo); phalcon_read_property_this(&pdo, this_ptr, SL("_pdo"), PH_NOISY_CC); if (Z_TYPE_P(pdo) != IS_OBJECT) { RETURN_MM_FALSE; } /** * Check the transaction nesting level */ PHALCON_OBS_VAR(transaction_level); phalcon_read_property_this(&transaction_level, this_ptr, SL("_transactionLevel"), PH_NOISY_CC); if (!zend_is_true(transaction_level)) { PHALCON_THROW_EXCEPTION_STR(phalcon_db_exception_ce, "There is no active transaction"); return; } if (PHALCON_IS_LONG(transaction_level, 1)) { PHALCON_OBS_VAR(events_manager); phalcon_read_property_this(&events_manager, this_ptr, SL("_eventsManager"), PH_NOISY_CC); /** * Notify the events manager about the commited transaction */ if (Z_TYPE_P(events_manager) == IS_OBJECT) { PHALCON_INIT_VAR(event_name); ZVAL_STRING(event_name, "db:commitTransaction", 1); phalcon_call_method_p2_noret(events_manager, "fire", event_name, this_ptr); } /** * Reduce the transaction nesting level */ phalcon_property_decr(this_ptr, SL("_transactionLevel") TSRMLS_CC); phalcon_call_method(return_value, pdo, "commit"); RETURN_MM(); } else { if (zend_is_true(transaction_level)) { if (zend_is_true(nesting)) { /** * Check if the current database system supports nested transactions */ PHALCON_INIT_VAR(ntw_savepoint); phalcon_call_method(ntw_savepoint, this_ptr, "isnestedtransactionswithsavepoints"); if (zend_is_true(ntw_savepoint)) { PHALCON_OBS_NVAR(events_manager); phalcon_read_property_this(&events_manager, this_ptr, SL("_eventsManager"), PH_NOISY_CC); PHALCON_INIT_VAR(savepoint_name); phalcon_call_method(savepoint_name, this_ptr, "getnestedtransactionsavepointname"); /** * Notify the events manager about the commited savepoint */ if (Z_TYPE_P(events_manager) == IS_OBJECT) { PHALCON_INIT_NVAR(event_name); ZVAL_STRING(event_name, "db:releaseSavepoint", 1); phalcon_call_method_p3_noret(events_manager, "fire", event_name, this_ptr, savepoint_name); } /** * Reduce the transaction nesting level */ phalcon_property_decr(this_ptr, SL("_transactionLevel") TSRMLS_CC); phalcon_call_method_p1(return_value, this_ptr, "releasesavepoint", savepoint_name); RETURN_MM(); } } } } /** * Reduce the transaction nesting level */ if (PHALCON_GT_LONG(transaction_level, 0)) { phalcon_property_decr(this_ptr, SL("_transactionLevel") TSRMLS_CC); } RETURN_MM_FALSE; }
/** * Handles uncaught exceptions * * @param \Exception $exception * @return boolean */ PHP_METHOD(Phalcon_Debug, onUncaughtException){ zval *exception, *ob_level, *is_active = NULL, *message = NULL; zval *class_name, *css_sources, *escaped_message = NULL; zval *html, *version, *file, *line, *show_back_trace; zval *data_vars, *trace, *trace_item = NULL, *n = NULL, *html_item = NULL; zval *_REQUEST, *value = NULL, *key_request = NULL, *_SERVER; zval *key_server = NULL, *files, *key_file = NULL, *true_usage; zval *memory, *data_var = NULL, *key_var = NULL, *variable = NULL, *dumped_argument = NULL; zval *js_sources; HashTable *ah0, *ah1, *ah2, *ah3, *ah4; HashPosition hp0, hp1, hp2, hp3, hp4; zval **hd; PHALCON_MM_GROW(); phalcon_fetch_params(1, 1, 0, &exception); PHALCON_INIT_VAR(ob_level); phalcon_call_func(ob_level, "ob_get_level"); /** * Cancel the output buffer if active */ if (PHALCON_GT_LONG(ob_level, 0)) { phalcon_ob_end_clean(TSRMLS_C); } PHALCON_OBS_VAR(is_active); phalcon_read_static_property(&is_active, SL("phalcon\\debug"), SL("_isActive") TSRMLS_CC); /** * Avoid that multiple exceptions being showed */ if (zend_is_true(is_active)) { PHALCON_INIT_VAR(message); phalcon_call_method(message, exception, "getmessage"); zend_print_zval(message, 0); } PHALCON_INIT_NVAR(is_active); ZVAL_BOOL(is_active, 1); /** * Globally block the debug component to avoid other exceptions must be shown */ phalcon_update_static_property(SL("phalcon\\debug"), SL("_isActive"), is_active TSRMLS_CC); PHALCON_INIT_VAR(class_name); phalcon_get_class(class_name, exception, 0 TSRMLS_CC); PHALCON_INIT_NVAR(message); phalcon_call_method(message, exception, "getmessage"); /** * CSS static sources to style the error presentation */ PHALCON_INIT_VAR(css_sources); phalcon_call_method(css_sources, this_ptr, "getcsssources"); /** * Escape the exception's message avoiding possible XSS injections? */ PHALCON_CPY_WRT(escaped_message, message); /** * Use the exception info as document's title */ PHALCON_INIT_VAR(html); PHALCON_CONCAT_SVSVS(html, "<html><head><title>", class_name, ": ", escaped_message, "</title>"); PHALCON_SCONCAT_VS(html, css_sources, "</head><body>"); /** * Get the version link */ PHALCON_INIT_VAR(version); phalcon_call_method(version, this_ptr, "getversion"); phalcon_concat_self(&html, version TSRMLS_CC); PHALCON_INIT_VAR(file); phalcon_call_method(file, exception, "getfile"); PHALCON_INIT_VAR(line); phalcon_call_method(line, exception, "getline"); /** * Main exception info */ phalcon_concat_self_str(&html, SL("<div align=\"center\"><div class=\"error-main\">") TSRMLS_CC); PHALCON_SCONCAT_SVSVS(html, "<h1>", class_name, ": ", escaped_message, "</h1>"); PHALCON_SCONCAT_SVSVS(html, "<span class=\"error-file\">", file, " (", line, ")</span>"); phalcon_concat_self_str(&html, SL("</div>") TSRMLS_CC); PHALCON_OBS_VAR(show_back_trace); phalcon_read_property_this(&show_back_trace, this_ptr, SL("_showBackTrace"), PH_NOISY_CC); /** * Check if the developer wants to show the backtrace or not */ if (zend_is_true(show_back_trace)) { PHALCON_OBS_VAR(data_vars); phalcon_read_property_this(&data_vars, this_ptr, SL("_data"), PH_NOISY_CC); /** * Create the tabs in the page */ phalcon_concat_self_str(&html, SL("<div class=\"error-info\"><div id=\"tabs\"><ul>") TSRMLS_CC); phalcon_concat_self_str(&html, SL("<li><a href=\"#error-tabs-1\">Backtrace</a></li>") TSRMLS_CC); phalcon_concat_self_str(&html, SL("<li><a href=\"#error-tabs-2\">Request</a></li>") TSRMLS_CC); phalcon_concat_self_str(&html, SL("<li><a href=\"#error-tabs-3\">Server</a></li>") TSRMLS_CC); phalcon_concat_self_str(&html, SL("<li><a href=\"#error-tabs-4\">Included Files</a></li>") TSRMLS_CC); phalcon_concat_self_str(&html, SL("<li><a href=\"#error-tabs-5\">Memory</a></li>") TSRMLS_CC); if (Z_TYPE_P(data_vars) == IS_ARRAY) { phalcon_concat_self_str(&html, SL("<li><a href=\"#error-tabs-6\">Variables</a></li>") TSRMLS_CC); } phalcon_concat_self_str(&html, SL("</ul>") TSRMLS_CC); /** * Print backtrace */ phalcon_concat_self_str(&html, SL("<div id=\"error-tabs-1\"><table cellspacing=\"0\" align=\"center\" width=\"100%\">") TSRMLS_CC); PHALCON_INIT_VAR(trace); phalcon_call_method(trace, exception, "gettrace"); phalcon_is_iterable(trace, &ah0, &hp0, 0, 0); while (zend_hash_get_current_data_ex(ah0, (void**) &hd, &hp0) == SUCCESS) { PHALCON_GET_HKEY(n, ah0, hp0); PHALCON_GET_HVALUE(trace_item); /** * Every line in the trace is rendered using 'showTraceItem' */ PHALCON_INIT_NVAR(html_item); phalcon_call_method_p2(html_item, this_ptr, "showtraceitem", n, trace_item); phalcon_concat_self(&html, html_item TSRMLS_CC); zend_hash_move_forward_ex(ah0, &hp0); } phalcon_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); /** * Print _REQUEST superglobal */ phalcon_concat_self_str(&html, SL("<div id=\"error-tabs-2\"><table cellspacing=\"0\" align=\"center\" class=\"superglobal-detail\">") TSRMLS_CC); phalcon_concat_self_str(&html, SL("<tr><th>Key</th><th>Value</th></tr>") TSRMLS_CC); phalcon_get_global(&_REQUEST, SS("_REQUEST") TSRMLS_CC); phalcon_is_iterable(_REQUEST, &ah1, &hp1, 0, 0); while (zend_hash_get_current_data_ex(ah1, (void**) &hd, &hp1) == SUCCESS) { PHALCON_GET_HKEY(key_request, ah1, hp1); PHALCON_GET_HVALUE(value); PHALCON_SCONCAT_SVSVS(html, "<tr><td class=\"key\">", key_request, "</td><td>", value, "</td></tr>"); zend_hash_move_forward_ex(ah1, &hp1); } phalcon_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); /** * Print _SERVER superglobal */ phalcon_concat_self_str(&html, SL("<div id=\"error-tabs-3\"><table cellspacing=\"0\" align=\"center\" class=\"superglobal-detail\">") TSRMLS_CC); phalcon_concat_self_str(&html, SL("<tr><th>Key</th><th>Value</th></tr>") TSRMLS_CC); phalcon_get_global(&_SERVER, SS("_SERVER") TSRMLS_CC); phalcon_is_iterable(_SERVER, &ah2, &hp2, 0, 0); while (zend_hash_get_current_data_ex(ah2, (void**) &hd, &hp2) == SUCCESS) { PHALCON_GET_HKEY(key_server, ah2, hp2); PHALCON_GET_HVALUE(value); PHALCON_SCONCAT_SVSVS(html, "<tr><td class=\"key\">", key_server, "</td><td>", value, "</td></tr>"); zend_hash_move_forward_ex(ah2, &hp2); } phalcon_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); /** * Show included files */ PHALCON_INIT_VAR(files); phalcon_call_func(files, "get_included_files"); phalcon_concat_self_str(&html, SL("<div id=\"error-tabs-4\"><table cellspacing=\"0\" align=\"center\" class=\"superglobal-detail\">") TSRMLS_CC); phalcon_concat_self_str(&html, SL("<tr><th>#</th><th>Path</th></tr>") TSRMLS_CC); phalcon_is_iterable(files, &ah3, &hp3, 0, 0); while (zend_hash_get_current_data_ex(ah3, (void**) &hd, &hp3) == SUCCESS) { PHALCON_GET_HKEY(key_file, ah3, hp3); PHALCON_GET_HVALUE(value); PHALCON_SCONCAT_SVSVS(html, "<tr><td>", key_file, "</th><td>", value, "</td></tr>"); zend_hash_move_forward_ex(ah3, &hp3); } phalcon_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); /** * Memory usage */ PHALCON_INIT_VAR(true_usage); ZVAL_BOOL(true_usage, 1); PHALCON_INIT_VAR(memory); phalcon_call_func_p1(memory, "memory_get_usage", true_usage); phalcon_concat_self_str(&html, SL("<div id=\"error-tabs-5\"><table cellspacing=\"0\" align=\"center\" class=\"superglobal-detail\">") TSRMLS_CC); PHALCON_SCONCAT_SVS(html, "<tr><th colspan=\"2\">Memory</th></tr><tr><td>Usage</td><td>", memory, "</td></tr>"); phalcon_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); /** * Print extra variables passed to the component */ if (Z_TYPE_P(data_vars) == IS_ARRAY) { phalcon_concat_self_str(&html, SL("<div id=\"error-tabs-6\"><table cellspacing=\"0\" align=\"center\" class=\"superglobal-detail\">") TSRMLS_CC); phalcon_concat_self_str(&html, SL("<tr><th>Key</th><th>Value</th></tr>") TSRMLS_CC); phalcon_is_iterable(data_vars, &ah4, &hp4, 0, 0); while (zend_hash_get_current_data_ex(ah4, (void**) &hd, &hp4) == SUCCESS) { PHALCON_GET_HKEY(key_var, ah4, hp4); PHALCON_GET_HVALUE(data_var); PHALCON_OBS_NVAR(variable); phalcon_array_fetch_long(&variable, data_var, 0, PH_NOISY_CC); PHALCON_INIT_NVAR(dumped_argument); phalcon_call_method_p1(dumped_argument, this_ptr, "_getvardump", variable); PHALCON_SCONCAT_SVSVS(html, "<tr><td class=\"key\">", key_var, "</td><td>", dumped_argument, "</td></tr>"); zend_hash_move_forward_ex(ah4, &hp4); } phalcon_concat_self_str(&html, SL("</table></div>") TSRMLS_CC); } phalcon_concat_self_str(&html, SL("</div>") TSRMLS_CC); } /** * Get Javascript sources */ PHALCON_INIT_VAR(js_sources); phalcon_call_method(js_sources, this_ptr, "getjssources"); PHALCON_SCONCAT_VS(html, js_sources, "</div></body></html>"); /** * Print the HTML, @TODO, add an option to store the html */ zend_print_zval(html, 0); PHALCON_INIT_NVAR(is_active); ZVAL_BOOL(is_active, 0); /** * Unlock the exception renderer */ phalcon_update_static_property(SL("phalcon\\debug"), SL("_isActive"), is_active TSRMLS_CC); RETURN_MM_TRUE; }