]> granicus.if.org Git - php/commitdiff
(zend_fetch_resource) added warinig if resource is of wrong type
authorThies C. Arntzen <thies@php.net>
Wed, 13 Oct 1999 12:59:48 +0000 (12:59 +0000)
committerThies C. Arntzen <thies@php.net>
Wed, 13 Oct 1999 12:59:48 +0000 (12:59 +0000)
Zend/zend_list.c

index 51a827e708c03c2287ce57e3e8dc75ba0a73e0cb..fd579990b52e8768f100f6353e9063c8ec8d1b01 100644 (file)
@@ -196,6 +196,10 @@ ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resou
                }
        }
        va_end(resource_types);
+
+       if (resource_type_name)
+               zend_error(E_WARNING, "Supplied resource is not a valid %s resource", resource_type_name);
+
        return NULL;
 }