From: Nikita Popov Date: Sat, 12 Nov 2016 21:17:21 +0000 (+0100) Subject: Fix build X-Git-Tag: php-7.2.0alpha1~941^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=547ad56b3194d0f1fb266948ecc24730e16784e3;p=php Fix build --- diff --git a/ext/xml/compat.c b/ext/xml/compat.c index 0bb7b28410..22f2abee24 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -593,15 +593,16 @@ has been defined and none can be detected */ } #endif + + if (parser->parser->lastError.level >= XML_ERR_WARNING) { + return 0; + } + error = xmlParseChunk(parser->parser, (char *) data, data_len, is_final); if (error) { return 0; } else { return 1; - } else if (parser->parser->lastError.level > XML_ERR_WARNING ){ - return 0; - } else { - return 1; } }