projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
f9e9575
)
class has to extend HttpMessage
author
Michael Wallner
<mike@php.net>
Thu, 19 Jan 2006 18:44:05 +0000
(18:44 +0000)
committer
Michael Wallner
<mike@php.net>
Thu, 19 Jan 2006 18:44:05 +0000
(18:44 +0000)
http_message_object.c
patch
|
blob
|
history
diff --git
a/http_message_object.c
b/http_message_object.c
index 31ba73f3241d139fb69dd5b6eee7e8b5888219d0..e6ce0646bfdaedafa0ec05ac8cf997bef396efb7 100644
(file)
--- a/
http_message_object.c
+++ b/
http_message_object.c
@@
-600,6
+600,10
@@
PHP_METHOD(HttpMessage, fromString)
if (class_name && *class_name) {
ce = zend_fetch_class(class_name, class_length, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
+ if (ce && !instanceof_function(ce, http_request_object_ce TSRMLS_CC)) {
+ http_error_ex(HE_WARNING, HTTP_E_RUNTIME, "Class %s does not extend HttpMessage", class_name);
+ ce = NULL;
+ }
}
if (ce) {
ZVAL_OBJVAL(return_value, http_message_object_new_ex(ce, msg, NULL));