diff --git a/src/ImportField.php b/src/ImportField.php index 8065bcc..e2baf09 100644 --- a/src/ImportField.php +++ b/src/ImportField.php @@ -387,19 +387,19 @@ public function importFromPOST($tmpFile, $splitHeader = false, $publishPages = f $els = $doc->getElementsByTagName('*'); $headingXPath = [ - 'self::h1', - 'self::h2', - 'self::h3', - 'self::h4', - 'self::h5', - 'self::h6', + 'ImportField::h1', + 'ImportField::h2', + 'ImportField::h3', + 'ImportField::h4', + 'ImportField::h5', + 'ImportField::h6', ]; // Remove a bunch of unwanted elements $clean = [ // Empty paragraphs - '//p[not(descendant-or-self::text() | descendant-or-self::img)]', + '//p[not(descendant-or-ImportField::text() | descendant-or-ImportField::img)]', // Empty headers - '//*[' . implode(' | ', $headingXPath) . '][not(descendant-or-self::text() | descendant-or-self::img)]', + '//*[' . implode(' | ', $headingXPath) . '][not(descendant-or-ImportField::text() | descendant-or-ImportField::img)]', // Anchors '//a[not(@href)]', // BR tags diff --git a/src/SettingsField.php b/src/SettingsField.php index e8a057e..2573491 100644 --- a/src/SettingsField.php +++ b/src/SettingsField.php @@ -33,7 +33,7 @@ class SettingsField extends CompositeField public function __construct($children = null) { if ($children) { - $class = self::class; + $class = SettingsField::class; throw new InvalidArgumentException( "{$class}::__construct does not accept extra parameters." );