src/lib/eZ/RichText/XmlBase.php
protected function collectErrors()
    {
        if ($this->useInternalErrors === null) {
            throw new RuntimeException('Error recording not started');
        }

        $xmlErrors = libxml_get_errors();
        $errors = [];
        foreach ($xmlErrors as $error) {
            $errors[] = $this->formatLibXmlError($error);
        }
        libxml_clear_errors();
        libxml_use_internal_errors($this->useInternalErrors);
        $this->useInternalErrors = null;

        return $errors;
    }
protected function collectErrors()
    {
        if ($this->useInternalErrors === null) {
            throw new RuntimeException('Error recording not started');
        }

        $xmlErrors = libxml_get_errors();
        $errors = [];
        foreach ($xmlErrors as $error) {
            $errors[] = $this->formatLibXmlError($error);
        }
        libxml_clear_errors();
        libxml_use_internal_errors($this->useInternalErrors);
        $this->useInternalErrors = null;

        return $errors;
    }
protected function collectErrors ( ) { if ( $ this -> useInternalErrors === null ) { throw new RuntimeException ( 'Error recording not started' ) ; } $ xmlErrors = libxml_get_errors ( ) ; $ errors = [ ] ; foreach ( $ xmlErrors as $ error ) { $ errors [ ] = $ this -> formatLibXmlError ( $ error ) ; } libxml_clear_errors ( ) ; libxml_use_internal_errors ( $ this -> useInternalErrors ) ; $ this -> useInternalErrors = null ; return $ errors ; }
Returns formatted errors from libxml error buffer and restores previous setting
for libxml error handling.

Before calling this method error recording must be started by calling {@link startRecordingErrors()}.

@see startRecordingErrors()

@uses ::formatLibXmlError()

@throws \RuntimeException If error recording is not started

@return string[]
Returns formatted errors from libxml error buffer and restores previous setting for libxml error handling .