Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix memleaks & update package2.xml

  • Loading branch information...
commit 6e32aff7225de4c87258e2f3082a241c3c324a39 1 parent 830f42f
@laruence authored
View
19 package2.xml
@@ -13,8 +13,8 @@
<date>2012-09-07</date>
<time>16:01:47</time>
<version>
- <release>2.2.1</release>
- <api>2.2.1</api>
+ <release>2.2.2</release>
+ <api>2.2.2</api>
</version>
<stability>
<release>beta</release>
@@ -22,18 +22,9 @@
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
- - (Repackage, previous one missed one fix)
- - Implemented Yaf_Response::setBody with key(which will make the layout easier to implement)
- - New method Yaf_View_Simple::eval, Yaf_View_Simple::clear
- - Support short open tag in view templates regardless of php.short_open_tag
- - Make Yaf_Autoload faster(30%)
- - Controller of default module can be autoloaded now
- - Single class can be local class now (previous is a design issue)
- - Performance improve in various place
- - Compatible with php5.5, which droped PHP logo guid
- - Fixed bug that Supervar should not respect the base_uri
- - Implemented FR #62702 (Make baseuri case-insensitive)
- - Implemented FR #62638 (Supports set yaf runtime configuration via application.ini)
+ - Yaf_Controller's methods are not final anymore
+ - Yaf_View_Simple is not final anymore
+ - Memleaks fixed in various place
</notes>
<contents>
<dir name="/">
View
2  requests/http.c
@@ -181,8 +181,10 @@ PHP_METHOD(yaf_request_http, isXmlHttpRequest) {
zval * header = yaf_request_query(YAF_GLOBAL_VARS_SERVER, ZEND_STRL("HTTP_X_REQUESTED_WITH") TSRMLS_CC);
if (Z_TYPE_P(header) == IS_STRING
&& strncasecmp("XMLHttpRequest", Z_STRVAL_P(header), Z_STRLEN_P(header)) == 0) {
+ zval_ptr_dtor(&header);
RETURN_TRUE;
}
+ zval_ptr_dtor(&header);
RETURN_FALSE;
}
/* }}} */
View
2  requests/simple.c
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simple.c 327554 2012-09-09 04:49:24Z laruence $ */
+/* $Id: simple.c 327580 2012-09-10 06:31:34Z laruence $ */
static zend_class_entry *yaf_request_simple_ce;
View
8 tests/052.phpt
@@ -26,6 +26,10 @@ echo "------params-------\n";
var_dump($request->setParam("xxxx"));
var_dump($request->getParam("xxxx"));
var_dump($request->getParams());
+echo "-----others-----\n";
+var_dump($request->isXmlHttpRequest());
+var_dump($request->isCli());
+var_dump($request->isPost());
?>
--EXPECTF--
Warning: Yaf_Request_Http::__construct() expects at most 2 parameters, 3 given in %s052.php on line %d
@@ -56,3 +60,7 @@ NULL
NULL
array(0) {
}
+-----others-----
+bool(false)
+bool(true)
+bool(false)
View
2  yaf.c
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: yaf.c 327514 2012-09-07 04:31:34Z laruence $ */
+/* $Id: yaf.c 327580 2012-09-10 06:31:34Z laruence $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
View
2  yaf_application.c
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: yaf_application.c 327549 2012-09-09 03:02:48Z laruence $ */
+/* $Id: yaf_application.c 327580 2012-09-10 06:31:34Z laruence $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
View
2  yaf_controller.c
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: yaf_controller.c 327561 2012-09-09 06:30:22Z laruence $ */
+/* $Id: yaf_controller.c 327580 2012-09-10 06:31:34Z laruence $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
View
4 yaf_dispatcher.c
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: yaf_dispatcher.c 327562 2012-09-09 06:54:44Z laruence $ */
+/* $Id: yaf_dispatcher.c 327580 2012-09-10 06:31:34Z laruence $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -700,6 +700,7 @@ int yaf_dispatcher_handle(yaf_dispatcher_t *dispatcher, yaf_request_t *request,
zend_update_property(ce, iaction, ZEND_STRL(YAF_CONTROLLER_PROPERTY_NAME_NAME), controller TSRMLS_CC);
zend_update_property(ce, iaction, ZEND_STRL(YAF_ACTION_PROPERTY_NAME_CTRL), icontroller TSRMLS_CC);
+ zval_ptr_dtor(&icontroller);
if (fptr->common.num_args) {
zval *method_name = NULL;
@@ -784,7 +785,6 @@ int yaf_dispatcher_handle(yaf_dispatcher_t *dispatcher, yaf_request_t *request,
}
} else {
zval_ptr_dtor(&executor);
- zval_ptr_dtor(&action);
}
}
zval_ptr_dtor(&action);
View
2  yaf_loader.c
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: yaf_loader.c 327560 2012-09-09 06:09:27Z laruence $ */
+/* $Id: yaf_loader.c 327580 2012-09-10 06:31:34Z laruence $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
View
2  yaf_loader.h
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: yaf_loader.h 327509 2012-09-07 03:26:22Z laruence $ */
+/* $Id: yaf_loader.h 327580 2012-09-10 06:31:34Z laruence $ */
#ifndef YAF_LOADER_H
#define YAF_LOADER_H
View
4 yaf_request.c
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: yaf_request.c 327552 2012-09-09 03:52:28Z laruence $*/
+/* $Id: yaf_request.c 327580 2012-09-10 06:31:34Z laruence $*/
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -345,7 +345,7 @@ zval * yaf_request_get_language(yaf_request_t *instance TSRMLS_DC) {
zval * accept_langs = yaf_request_query(YAF_GLOBAL_VARS_SERVER, ZEND_STRL("HTTP_ACCEPT_LANGUAGE") TSRMLS_CC);
if (IS_STRING != Z_TYPE_P(accept_langs) || !Z_STRLEN_P(accept_langs)) {
- return lang;
+ return accept_langs;
} else {
char *ptrptr, *seg;
uint prefer_len = 0;
View
2  yaf_response.c
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: yaf_response.c 327560 2012-09-09 06:09:27Z laruence $ */
+/* $Id: yaf_response.c 327580 2012-09-10 06:31:34Z laruence $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
View
2  yaf_router.h
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: yaf_router.h 321289 2011-12-21 02:53:29Z laruence $ */
+/* $Id: yaf_router.h 327580 2012-09-10 06:31:34Z laruence $ */
#ifndef YAF_ROUTER_H
#define YAF_ROUTER_H
View
2  yaf_session.c
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: yaf_session.c 327425 2012-09-02 03:58:49Z laruence $ */
+/* $Id: yaf_session.c 327580 2012-09-10 06:31:34Z laruence $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
Please sign in to comment.
Something went wrong with that request. Please try again.