From: <var...@us...> - 2010-10-20 16:19:46
|
Revision: 7716 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7716&view=rev Author: vargenau Date: 2010-10-20 16:19:40 +0000 (Wed, 20 Oct 2010) Log Message: ----------- Check file exists Modified Paths: -------------- trunk/lib/stdlib.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2010-10-14 15:49:22 UTC (rev 7715) +++ trunk/lib/stdlib.php 2010-10-20 16:19:40 UTC (rev 7716) @@ -649,9 +649,9 @@ } $type = $img->getAttr('type'); if (!$type) { - // TODO: map extension to mime-types if type is not given and php < 4.3 - if (function_exists('mime_content_type')) + if (function_exists('mime_content_type') && file_exists($url)) { $type = mime_content_type($url); + } } $object = HTML::object(array_merge($img->_attr, array('type' => $type)), //'src' => $url This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |