@@ -85,7 +85,7 @@ static int xmlreader_property_reader(xmlreader_object *obj, xmlreader_prop_handl
85
85
if (hnd -> read_int_func ) {
86
86
retint = hnd -> read_int_func (obj -> ptr );
87
87
if (retint == -1 ) {
88
- php_error_docref (NULL , E_WARNING , "Internal libxml error returned " );
88
+ zend_throw_error (NULL , "Failed to read property due to libxml error" );
89
89
return FAILURE ;
90
90
}
91
91
}
@@ -100,15 +100,13 @@ static int xmlreader_property_reader(xmlreader_object *obj, xmlreader_prop_handl
100
100
ZVAL_EMPTY_STRING (rv );
101
101
}
102
102
break ;
103
- /* this IS_FALSE actually means it's a BOOL type */
104
- case IS_FALSE :
103
+ case _IS_BOOL :
105
104
ZVAL_BOOL (rv , retint );
106
105
break ;
107
106
case IS_LONG :
108
107
ZVAL_LONG (rv , retint );
109
108
break ;
110
- default :
111
- ZVAL_NULL (rv );
109
+ EMPTY_SWITCH_DEFAULT_CASE ()
112
110
}
113
111
114
112
return SUCCESS ;
@@ -1169,10 +1167,10 @@ PHP_MINIT_FUNCTION(xmlreader)
1169
1167
xmlreader_register_prop_handler (& xmlreader_prop_handlers , "attributeCount" , xmlTextReaderAttributeCount , NULL , IS_LONG );
1170
1168
xmlreader_register_prop_handler (& xmlreader_prop_handlers , "baseURI" , NULL , xmlTextReaderConstBaseUri , IS_STRING );
1171
1169
xmlreader_register_prop_handler (& xmlreader_prop_handlers , "depth" , xmlTextReaderDepth , NULL , IS_LONG );
1172
- xmlreader_register_prop_handler (& xmlreader_prop_handlers , "hasAttributes" , xmlTextReaderHasAttributes , NULL , IS_FALSE );
1173
- xmlreader_register_prop_handler (& xmlreader_prop_handlers , "hasValue" , xmlTextReaderHasValue , NULL , IS_FALSE );
1174
- xmlreader_register_prop_handler (& xmlreader_prop_handlers , "isDefault" , xmlTextReaderIsDefault , NULL , IS_FALSE );
1175
- xmlreader_register_prop_handler (& xmlreader_prop_handlers , "isEmptyElement" , xmlTextReaderIsEmptyElement , NULL , IS_FALSE );
1170
+ xmlreader_register_prop_handler (& xmlreader_prop_handlers , "hasAttributes" , xmlTextReaderHasAttributes , NULL , _IS_BOOL );
1171
+ xmlreader_register_prop_handler (& xmlreader_prop_handlers , "hasValue" , xmlTextReaderHasValue , NULL , _IS_BOOL );
1172
+ xmlreader_register_prop_handler (& xmlreader_prop_handlers , "isDefault" , xmlTextReaderIsDefault , NULL , _IS_BOOL );
1173
+ xmlreader_register_prop_handler (& xmlreader_prop_handlers , "isEmptyElement" , xmlTextReaderIsEmptyElement , NULL , _IS_BOOL );
1176
1174
xmlreader_register_prop_handler (& xmlreader_prop_handlers , "localName" , NULL , xmlTextReaderConstLocalName , IS_STRING );
1177
1175
xmlreader_register_prop_handler (& xmlreader_prop_handlers , "name" , NULL , xmlTextReaderConstName , IS_STRING );
1178
1176
xmlreader_register_prop_handler (& xmlreader_prop_handlers , "namespaceURI" , NULL , xmlTextReaderConstNamespaceUri , IS_STRING );
0 commit comments