projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix arginfo
[m6w6/ext-http]
/
php_http_message.c
diff --git
a/php_http_message.c
b/php_http_message.c
index a99a0bb2ecf42ca70e7ab45c4f6379e480b5d62d..066deca86566b3e640d6e92e0d9ab2f112e39c49 100644
(file)
--- a/
php_http_message.c
+++ b/
php_http_message.c
@@
-10,11
+10,7
@@
+--------------------------------------------------------------------+
*/
+--------------------------------------------------------------------+
*/
-#include "php_http.h"
-
-#include <main/SAPI.h>
-#include <ext/spl/spl_iterators.h>
-#include <Zend/zend_interfaces.h>
+#include "php_http_api.h"
PHP_HTTP_API zend_bool php_http_message_info_callback(php_http_message_t **message, HashTable **headers, php_http_info_t *info TSRMLS_DC)
{
PHP_HTTP_API zend_bool php_http_message_info_callback(php_http_message_t **message, HashTable **headers, php_http_info_t *info TSRMLS_DC)
{
@@
-1157,18
+1153,16
@@
static zval *php_http_message_object_read_prop(zval *object, zval *member, int t
zval *return_value, *copy = php_http_ztyp(IS_STRING, member);
if (SUCCESS == php_http_message_object_get_prophandler(Z_STRVAL_P(copy), Z_STRLEN_P(copy), &handler)) {
zval *return_value, *copy = php_http_ztyp(IS_STRING, member);
if (SUCCESS == php_http_message_object_get_prophandler(Z_STRVAL_P(copy), Z_STRLEN_P(copy), &handler)) {
- if (type == BP_VAR_W) {
- zval_ptr_dtor(©);
+ if (type == BP_VAR_R) {
+ ALLOC_ZVAL(return_value);
+ Z_SET_REFCOUNT_P(return_value, 0);
+ Z_UNSET_ISREF_P(return_value);
+
+ handler->read(obj, return_value TSRMLS_CC);
+ } else {
zend_error(E_ERROR, "Cannot access HttpMessage properties by reference or array key/index");
zend_error(E_ERROR, "Cannot access HttpMessage properties by reference or array key/index");
- return NULL;
+ return
_value =
NULL;
}
}
-
- ALLOC_ZVAL(return_value);
- Z_SET_REFCOUNT_P(return_value, 0);
- Z_UNSET_ISREF_P(return_value);
-
- handler->read(obj, return_value TSRMLS_CC);
-
} else {
return_value = zend_get_std_object_handlers()->read_property(object, member, type, literal_key TSRMLS_CC);
}
} else {
return_value = zend_get_std_object_handlers()->read_property(object, member, type, literal_key TSRMLS_CC);
}