Skip to content

Commit

Permalink
Merge pull request #1468 from sjinks/issue-1467
Browse files Browse the repository at this point in the history
Fix #1467
  • Loading branch information
Phalcon committed Oct 29, 2013
2 parents 177d4bc + 6a40a3e commit 9312edc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ext/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ PHP_METHOD(Phalcon_Debug, onUncaughtException){
/**
* Globally block the debug component to avoid other exceptions must be shown
*/
phalcon_update_static_property_ce(phalcon_debug_ce, SL("_isActive"), PHALCON_GLOBAL(z_true) TSRMLS_CC);
zend_update_static_property_bool(phalcon_debug_ce, SL("_isActive"), 1 TSRMLS_CC);

PHALCON_INIT_VAR(class_name);
phalcon_get_class(class_name, exception, 0 TSRMLS_CC);
Expand Down Expand Up @@ -1252,7 +1252,7 @@ PHP_METHOD(Phalcon_Debug, onUncaughtException){
/**
* Unlock the exception renderer
*/
phalcon_update_static_property_ce(phalcon_debug_ce, SL("_isActive"), PHALCON_GLOBAL(z_false) TSRMLS_CC);
zend_update_static_property_bool(phalcon_debug_ce, SL("_isActive"), 0 TSRMLS_CC);
RETURN_MM_TRUE;
}

Expand Down
2 changes: 1 addition & 1 deletion ext/di.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,5 +624,5 @@ PHP_METHOD(Phalcon_DI, getDefault){
*/
PHP_METHOD(Phalcon_DI, reset){

phalcon_update_static_property_ce(phalcon_di_ce, SL("_default"), PHALCON_GLOBAL(z_null) TSRMLS_CC);
zend_update_static_property_null(phalcon_di_ce, SL("_default") TSRMLS_CC);
}
2 changes: 1 addition & 1 deletion ext/mvc/router/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,5 +704,5 @@ PHP_METHOD(Phalcon_Mvc_Router_Route, getConverters){
*/
PHP_METHOD(Phalcon_Mvc_Router_Route, reset){

phalcon_update_static_property_ce(phalcon_mvc_router_route_ce, SL("_uniqueId"), PHALCON_GLOBAL(z_zero) TSRMLS_CC);
zend_update_static_property_long(phalcon_mvc_router_route_ce, SL("_uniqueId"), 0 TSRMLS_CC);
}
10 changes: 10 additions & 0 deletions ext/tests/issue-1467.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--TEST--
Phalcon\DI::reset() is buggy - https://github.com/phalcon/cphalcon/issues/1467
--SKIPIF--
<?php include('skipif.inc');
--FILE--
<?php
\Phalcon\Di::reset();
$di = new \Phalcon\DI\FactoryDefault();
?>
--EXPECT--

0 comments on commit 9312edc

Please sign in to comment.