mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Fix tests on PHP 5.4
This commit is contained in:
@@ -878,7 +878,8 @@ class module_report
|
||||
public static function getHost($url)
|
||||
{
|
||||
$parse_url = parse_url(trim($url));
|
||||
$result = isset($parse_url['host']) ? $parse_url['host'] : array_shift(explode('/', $parse_url['path'], 2));
|
||||
$paths = explode('/', $parse_url['path'], 2);
|
||||
$result = isset($parse_url['host']) ? $parse_url['host'] : array_shift($paths);
|
||||
|
||||
return trim($result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user