N°6037 - PHP 8.3: Update parameters and return type hints to match parent's

This commit is contained in:
Molkobain
2024-01-24 16:12:00 +01:00
parent b63af9b919
commit 865b6d14f0

View File

@@ -64,16 +64,22 @@ class DesignDocument extends DOMDocument
/**
* Overload of the standard API
*
* @param $filename
* @param string $filename
* @param int $options
*
* @return bool
*/
public function load($filename, $options = null)
public function load(string $filename, int $options = 0): bool
{
libxml_clear_errors();
if (parent::load($filename, LIBXML_NOBLANKS) === false) {
$aErrors = libxml_get_errors();
IssueLog::Error("Error loading $filename", LogAPI::CHANNEL_DEFAULT, $aErrors);
return false;
}
return true;
}
/**