Skip to content
11 changes: 11 additions & 0 deletions libraries/src/Filesystem/Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ public static function clean($path, $ds = DIRECTORY_SEPARATOR)
);
}

if ($path === null) {
@trigger_error(
sprintf(
'Path can not be null, in 5.0 it will throw an exception',
__METHOD__
),
E_USER_DEPRECATED
);
$path = '';
}

$path = trim($path);

if (empty($path)) {
Expand Down