Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if test "$PHP_YAF" != "no"; then
routes/yaf_route_simple.c \
routes/yaf_route_supervar.c \
routes/yaf_route_regex.c \
routes/yaf_route_rewrite.c \
routes/yaf_route_rewrite.c \
routes/yaf_route_map.c \
yaf_loader.c \
yaf_registry.c \
Expand Down
2 changes: 1 addition & 1 deletion tests/038.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ require "build.inc";
shutdown();
?>
--EXPECTF--
Parse error: syntax error, unexpected %s}%c in %sfoo.phtml on line %d
Parse error: syntax error, unexpected %s in %sfoo.phtml on line %d
2 changes: 1 addition & 1 deletion tests/039.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ require "build.inc";
shutdown();
?>
--EXPECTF--
syntax error, unexpected %s}%c
syntax error, unexpected %s
2 changes: 1 addition & 1 deletion tests/104.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ string(%s) "Failed opening action script %sindex.php: No such file or directory"
string(61) "Action 'IndexAction' is not a subclass of Yaf_Action_Abstract"
string(61) "Action 'IndexAction' is not a subclass of Yaf_Action_Abstract"

Fatal error: Class FooAction contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Yaf_Action_Abstract::execute) in %sfoo.php on line %d
Fatal error: Class FooAction contains 1 abstract method and must therefore be declared abstract or implement the remaining method%s(Yaf_Action_Abstract::execute) in %sfoo.php on line %d
18 changes: 9 additions & 9 deletions yaf_dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "php.h"
#include "main/SAPI.h" /* for sapi_module */
#include "Zend/zend_interfaces.h" /* for zend_call_method_with_* */
#include "Zend/zend_exceptions.h" /* for zend_exception_get_default */
#include "Zend/zend_exceptions.h" /* for zend_ce_exception */

#include "php_yaf.h"
#include "yaf_namespace.h"
Expand Down Expand Up @@ -355,7 +355,7 @@ static zend_class_entry *yaf_dispatcher_get_controller(zend_string *app_dir, yaf
directory_len += yaf_compose_2_pathes(directory + directory_len, module, ZEND_STRL(YAF_CONTROLLER_DIRECTORY_NAME));
}

STR_ALLOCA_ALLOC(lc_name, ZSTR_LEN(controller) + YAF_G(name_separator_len) + sizeof("controller") - 1, use_heap);
ZSTR_ALLOCA_ALLOC(lc_name, ZSTR_LEN(controller) + YAF_G(name_separator_len) + sizeof("controller") - 1, use_heap);
if (EXPECTED(yaf_is_name_suffix())) {
char *p = ZSTR_VAL(lc_name);
zend_str_tolower_copy(p, ZSTR_VAL(controller), ZSTR_LEN(controller));
Expand All @@ -381,15 +381,15 @@ static zend_class_entry *yaf_dispatcher_get_controller(zend_string *app_dir, yaf
if (yaf_loader_load_internal(l, ZSTR_VAL(controller), ZSTR_LEN(controller), directory, directory_len)) {
if (EXPECTED((ce = zend_hash_find_ptr(EG(class_table), lc_name)))) {
if (EXPECTED(instanceof_function(ce, yaf_controller_ce))) {
STR_ALLOCA_FREE(lc_name, use_heap);
ZSTR_ALLOCA_FREE(lc_name, use_heap);
return ce;
}
}
}
STR_ALLOCA_FREE(lc_name, use_heap);
ZSTR_ALLOCA_FREE(lc_name, use_heap);
return yaf_dispatcher_get_errors_hub(1, ce, controller, directory, directory_len);
}
STR_ALLOCA_FREE(lc_name, use_heap);
ZSTR_ALLOCA_FREE(lc_name, use_heap);
return ce;
}
/* }}} */
Expand Down Expand Up @@ -417,7 +417,7 @@ static zend_class_entry *yaf_dispatcher_get_action(zend_string *app_dir, yaf_con
zend_string *lc_name;
ALLOCA_FLAG(use_heap);

STR_ALLOCA_ALLOC(lc_name, ZSTR_LEN(action) + YAF_G(name_separator_len) + sizeof("action") - 1, use_heap);
ZSTR_ALLOCA_ALLOC(lc_name, ZSTR_LEN(action) + YAF_G(name_separator_len) + sizeof("action") - 1, use_heap);
if (EXPECTED(yaf_is_name_suffix())) {
char *p = ZSTR_VAL(lc_name);
memcpy(p, ZSTR_VAL(action), ZSTR_LEN(action));
Expand All @@ -440,7 +440,7 @@ static zend_class_entry *yaf_dispatcher_get_action(zend_string *app_dir, yaf_con

if ((ce = zend_hash_find_ptr(EG(class_table), lc_name)) != NULL) {
if (EXPECTED(instanceof_function(ce, yaf_action_ce))) {
STR_ALLOCA_FREE(lc_name, use_heap);
ZSTR_ALLOCA_FREE(lc_name, use_heap);
return ce;
}
} else if (((pzval = zend_hash_find_ind(Z_ARRVAL_P(actions_map), action)) != NULL) &&
Expand All @@ -453,13 +453,13 @@ static zend_class_entry *yaf_dispatcher_get_action(zend_string *app_dir, yaf_con
if (yaf_loader_import(path, len)) {
if ((ce = zend_hash_find_ptr(EG(class_table), lc_name)) != NULL) {
if (EXPECTED(instanceof_function(ce, yaf_action_ce))) {
STR_ALLOCA_FREE(lc_name, use_heap);
ZSTR_ALLOCA_FREE(lc_name, use_heap);
return ce;
}
}
}
}
STR_ALLOCA_FREE(lc_name, use_heap);
ZSTR_ALLOCA_FREE(lc_name, use_heap);
}

return yaf_dispatcher_get_errors_hub(2, ce, actions_map, action, controller, path);
Expand Down
2 changes: 1 addition & 1 deletion yaf_exception.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ zend_class_entry * yaf_get_exception_base(int root) /* {{{ */ {
}
#endif

return zend_exception_get_default();
return zend_ce_exception;
}
/* }}} */

Expand Down
2 changes: 1 addition & 1 deletion yaf_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "php.h"
#include "main/SAPI.h"
#include "standard/php_string.h" /* for php_basename */
#include "Zend/zend_exceptions.h" /* for zend_exception_get_default */
#include "Zend/zend_exceptions.h" /* for zend_ce_exception */
#include "Zend/zend_interfaces.h" /* for zend_class_serialize_deny */
#include "Zend/zend_smart_str.h"

Expand Down
Loading