mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
we need to first check if the constant is defined, as we get a fatal error in php5.3 otherwise
This commit is contained in:
parent
d4b9dee585
commit
7f264987a6
@ -555,7 +555,10 @@ class vfs_stream_wrapper implements iface_stream_wrapper
|
||||
if (!$mime && ($scheme = parse_url($url,PHP_URL_SCHEME)))
|
||||
{
|
||||
// check it it's an eGW stream wrapper returning mime-type via url_stat
|
||||
if (class_exists($class = $scheme.'_stream_wrapper') && ($mime_attr = @constant($class.'::STAT_RETURN_MIME_TYPE')))
|
||||
// we need to first check if the constant is defined, as we get a fatal error in php5.3 otherwise
|
||||
if (class_exists($class = self::scheme2class($scheme)) &&
|
||||
defined($class.'::STAT_RETURN_MIME_TYPE') &&
|
||||
($mime_attr = constant($class.'::STAT_RETURN_MIME_TYPE')))
|
||||
{
|
||||
$stat = call_user_func(array($scheme.'_stream_wrapper','url_stat'),parse_url($url,PHP_URL_PATH),0);
|
||||
if ($stat[$mime_attr])
|
||||
|
Loading…
Reference in New Issue
Block a user