diff --git a/configs/yaf_config_simple.c b/configs/yaf_config_simple.c index fc3b412a..4ba962fe 100644 --- a/configs/yaf_config_simple.c +++ b/configs/yaf_config_simple.c @@ -314,7 +314,7 @@ PHP_METHOD(yaf_config_simple, next) { */ PHP_METHOD(yaf_config_simple, valid) { zval *prop = zend_read_property(yaf_config_simple_ce, getThis(), ZEND_STRL(YAF_CONFIG_PROPERT_NAME), 1 TSRMLS_CC); - RETURN_LONG(zend_hash_has_more_elements(Z_ARRVAL_P(prop)) == SUCCESS); + RETURN_BOOL(zend_hash_has_more_elements(Z_ARRVAL_P(prop)) == SUCCESS); } /* }}} */ diff --git a/package2.xml b/package2.xml index 43ac9629..a52f6775 100644 --- a/package2.xml +++ b/package2.xml @@ -164,6 +164,7 @@ + diff --git a/routes/yaf_route_map.h b/routes/yaf_route_map.h index 0029da79..04ef2536 100644 --- a/routes/yaf_route_map.h +++ b/routes/yaf_route_map.h @@ -19,7 +19,7 @@ #ifndef YAF_ROUTER_MAP_H #define YAF_ROUTER_MAP_H -#define YAF_ROUTE_MAP_VAR_NAME_DELIMETER "_delimeter" +#define YAF_ROUTE_MAP_VAR_NAME_DELIMETER "_delimiter" #define YAF_ROUTE_MAP_VAR_NAME_CTL_PREFER "_ctl_router" extern zend_class_entry *yaf_route_map_ce; diff --git a/routes/yaf_route_rewrite.c b/routes/yaf_route_rewrite.c index 5b1bc68c..b3924661 100644 --- a/routes/yaf_route_rewrite.c +++ b/routes/yaf_route_rewrite.c @@ -243,7 +243,7 @@ int yaf_route_rewrite_route(yaf_route_t *router, yaf_request_t *request TSRMLS_D } /* }}} */ -/** {{{ proto public Yaf_Route_Rewrite::route(Yaf_Request_Abstarct $request) +/** {{{ proto public Yaf_Route_Rewrite::route(Yaf_Request_Abstract $request) */ PHP_METHOD(yaf_route_rewrite, route) { yaf_route_t *route; diff --git a/routes/yaf_route_simple.c b/routes/yaf_route_simple.c index 6014a1e9..1aeb9254 100644 --- a/routes/yaf_route_simple.c +++ b/routes/yaf_route_simple.c @@ -120,7 +120,7 @@ PHP_METHOD(yaf_route_simple, __construct) { || IS_STRING != Z_TYPE_P(controller) || IS_STRING != Z_TYPE_P(action)) { YAF_UNINITIALIZED_OBJECT(getThis()); - yaf_trigger_error(YAF_ERR_TYPE_ERROR TSRMLS_CC, "Expect 3 string paramsters", yaf_route_simple_ce->name); + yaf_trigger_error(YAF_ERR_TYPE_ERROR TSRMLS_CC, "Expect 3 string parameters", yaf_route_simple_ce->name); RETURN_FALSE; } else { (void)yaf_route_simple_instance(getThis(), module, controller, action TSRMLS_CC); diff --git a/tests/031.phpt b/tests/031.phpt index 679b923d..e3ce5097 100644 --- a/tests/031.phpt +++ b/tests/031.phpt @@ -29,7 +29,7 @@ Array [_default] => Yaf_Route_Map Object ( [_ctl_router:protected] => 1 - [_delimeter:protected] => ## + [_delimiter:protected] => ## ) ) diff --git a/tests/071.phpt b/tests/071.phpt new file mode 100644 index 00000000..d5bfdcf5 --- /dev/null +++ b/tests/071.phpt @@ -0,0 +1,14 @@ +--TEST-- +return type in Yaf_Simple_Config::valid() should be boolean +--SKIPIF-- + +--INI-- +--FILE-- +valid()); +?> +--CLEAN-- +--EXPECTF-- +bool(false) diff --git a/tools/yaf_classes.php b/tools/yaf_classes.php index de759414..f85af8c5 100644 --- a/tools/yaf_classes.php +++ b/tools/yaf_classes.php @@ -909,7 +909,7 @@ final class Yaf_Route_Map implements Yaf_Route_Interface { /* properties */ protected $_ctl_router = ""; - protected $_delimeter = NULL; + protected $_delimiter = NULL; /* methods */ public function __construct($controller_prefer = NULL, $delimiter = NULL) { diff --git a/yaf_response.c b/yaf_response.c index a9471df9..efba3479 100644 --- a/yaf_response.c +++ b/yaf_response.c @@ -263,13 +263,13 @@ PHP_METHOD(yaf_response, __construct) { } /* }}} */ -/** {{{ proto public Yaf_Response_Abstract::__desctruct(void) +/** {{{ proto public Yaf_Response_Abstract::__destruct(void) */ PHP_METHOD(yaf_response, __destruct) { } /* }}} */ -/** {{{ proto public Yaf_Response_Abstract::appenBody($body, $name = NULL) +/** {{{ proto public Yaf_Response_Abstract::appendBody($body, $name = NULL) */ PHP_METHOD(yaf_response, appendBody) { char *body, *name = NULL; @@ -314,6 +314,7 @@ PHP_METHOD(yaf_response, prependBody) { /** {{{ proto public Yaf_Response_Abstract::setHeader($name, $value, $replace = 0) */ PHP_METHOD(yaf_response, setHeader) { + //todo: implement RETURN_FALSE; } /* }}} */ @@ -321,6 +322,7 @@ PHP_METHOD(yaf_response, setHeader) { /** {{{ proto protected Yaf_Response_Abstract::setAllHeaders(void) */ PHP_METHOD(yaf_response, setAllHeaders) { + //todo: implement RETURN_FALSE; } /* }}} */ @@ -328,6 +330,7 @@ PHP_METHOD(yaf_response, setAllHeaders) { /** {{{ proto public Yaf_Response_Abstract::getHeader(void) */ PHP_METHOD(yaf_response, getHeader) { + //todo: implement RETURN_NULL(); } /* }}} */ @@ -335,6 +338,7 @@ PHP_METHOD(yaf_response, getHeader) { /** {{{ proto public Yaf_Response_Abstract::clearHeaders(void) */ PHP_METHOD(yaf_response, clearHeaders) { + //todo: implement RETURN_FALSE; } /* }}} */