mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-27 20:48:46 +02:00
N°8834 - Add compatibility with PHP 8.4 (#819)
* N°8834 - Add compatibility with PHP 8.4 * Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
@@ -29,13 +29,13 @@ class DirectoryResource implements SelfCheckingResourceInterface
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function __construct(string $resource, string $pattern = null)
|
||||
public function __construct(string $resource, ?string $pattern = null)
|
||||
{
|
||||
$resolvedResource = realpath($resource) ?: (file_exists($resource) ? $resource : false);
|
||||
$this->pattern = $pattern;
|
||||
|
||||
if (false === $resolvedResource || !is_dir($resolvedResource)) {
|
||||
throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist.', $resource));
|
||||
throw new \InvalidArgumentException(\sprintf('The directory "%s" does not exist.', $resource));
|
||||
}
|
||||
|
||||
$this->resource = $resolvedResource;
|
||||
|
||||
Reference in New Issue
Block a user