cvs: pecl /http http_message_object.c
| From: | Michael Wallner | Date: | Thu, 19 Jan 2006 18:44:05 +0000 |
| Subject: | cvs: pecl /http http_message_object.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-4994@lists.php.net to get a copy of this message | ||
mike Thu Jan 19 18:44:05 2006 UTC
Modified files:
/pecl/http http_message_object.c
Log:
class has to extend HttpMessage
http://cvs.php.net/viewcvs.cgi/pecl/http/http_message_object.c?r1=1.70&r2=1.71&diff_format=u
Index: pecl/http/http_message_object.c
diff -u pecl/http/http_message_object.c:1.70 pecl/http/http_message_object.c:1.71
--- pecl/http/http_message_object.c:1.70 Thu Jan 19 18:33:05 2006
+++ pecl/http/http_message_object.c Thu Jan 19 18:44:05 2006
@@ -10,7 +10,7 @@
+--------------------------------------------------------------------+
*/
-/* $Id: http_message_object.c,v 1.70 2006/01/19 18:33:05 mike Exp $ */
+/* $Id: http_message_object.c,v 1.71 2006/01/19 18:44:05 mike Exp $ */
#include "php_http.h"
@@ -600,6 +600,10 @@
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));