From: Nick Jenkins Date: Fri, 12 Jan 2007 05:44:25 +0000 (+0000) Subject: Prevent E_STRICT errors on file upload of the following type: X-Git-Tag: 1.31.0-rc.0~54481 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=32fd94a8ce7d3eb1e6c4371f28663fe1fcddb54f;p=lhc%2Fweb%2Fwiklou.git Prevent E_STRICT errors on file upload of the following type: * Strict Standards: Undefined index: application/ogg in includes/MimeMagic.php on line 154 * Strict Standards: Undefined index: ogm in includes/MimeMagic.php on line 163 --- diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php index ca05dbb351..9fc0bf7c6d 100644 --- a/includes/MimeMagic.php +++ b/includes/MimeMagic.php @@ -149,7 +149,7 @@ class MimeMagic { if (empty($ext)) continue; - if (@$this->mMimeToExt[$mime]) $this->mMimeToExt[$mime] .= ' '.$ext; + if ( !empty($this->mMimeToExt[$mime])) $this->mMimeToExt[$mime] .= ' '.$ext; else $this->mMimeToExt[$mime]= $ext; $extensions= explode(' ',$ext); @@ -158,7 +158,7 @@ class MimeMagic { $e= trim($e); if (empty($e)) continue; - if (@$this->mExtToMime[$e]) $this->mExtToMime[$e] .= ' '.$mime; + if ( !empty($this->mExtToMime[$e])) $this->mExtToMime[$e] .= ' '.$mime; else $this->mExtToMime[$e]= $mime; } }