TSRMLS_FETCH();
if (Z_TYPE_P(wrapper) != IS_OBJECT) {
- php_error(E_ERROR, "Wrapper is not an object");
+ php_error(E_WARNING, "Wrapper is not an object");
+ return NULL;
}
if (zend_hash_index_find(Z_OBJPROP_P(wrapper), 0, (void **) &handle) == FAILURE) {
- php_error(E_ERROR, "Underlying object missing");
+ php_error(E_WARNING, "Underlying object missing");
+ return NULL;
}
obj = zend_list_find(Z_LVAL_PP(handle), &type);
if (!obj || ((type != rsrc_type1) && (type != rsrc_type2))) {
- php_error(E_ERROR, "Underlying object missing or of invalid type");
+ php_error(E_WARNING, "Underlying object missing or of invalid type");
+ return NULL;
}
return obj;
int type;
if (Z_TYPE_P(wrapper) != IS_OBJECT) {
- php_error(E_ERROR, "Wrapper is not an object");
+ php_error(E_WARNING, "Wrapper is not an object");
+ return NULL;
}
if (zend_hash_index_find(Z_OBJPROP_P(wrapper), 0, (void **) &handle) ==
FAILURE) {
- php_error(E_ERROR, "Underlying object missing");
+ php_error(E_WARNING, "Underlying object missing");
+ return NULL;
}
obj = zend_list_find(Z_LVAL_PP(handle), &type);
if (!obj || ((type != rsrc_type1) && (type != rsrc_type2))) {
- php_error(E_ERROR, "Underlying object missing or of invalid type");
+ php_error(E_WARNING, "Underlying object missing or of invalid type");
+ return NULL;
}
return obj;
int type;
if (Z_TYPE_P(wrapper) != IS_OBJECT) {
- php_error(E_ERROR, "Wrapper is not an object");
+ php_error(E_WARNING, "Wrapper is not an object");
+ return NULL;
}
if (zend_hash_index_find(Z_OBJPROP_P(wrapper), 0, (void **) &handle) == FAILURE) {
- php_error(E_ERROR, "Underlying object missing");
+ php_error(E_WARNING, "Underlying object missing");
+ return NULL;
}
obj = zend_list_find(Z_LVAL_PP(handle), &type);
/* The following test should be replaced with search in all parents */
if (!obj) { /* || ((type != rsrc_type1) && (type != rsrc_type2))) { */
- php_error(E_ERROR, "Underlying object missing or of invalid type");
+ php_error(E_WARNING, "Underlying object missing or of invalid type");
+ return NULL;
}
return obj;
id = getThis();
attrp = php_dom_get_object(id, le_domxmlattrp, 0 TSRMLS_CC);
+ if (!attrp) {
+ RETURN_FALSE;
+ }
RETURN_STRING((char *) (attrp->name), 1);
}
id = getThis();
if (!id) {
- php_error(E_ERROR, "Invalid object");
+ php_error(E_WARNING, "Invalid object");
RETURN_FALSE;
}
ctxp = php_xpath_get_context(id, le_xpathctxp, 0 TSRMLS_CC);
+ if (!ctxp) {
+ RETURN_FALSE;
+ }
convert_to_string(str);
if (contextnode) {