Permalink
Browse files

Adding $pos = 0; to avoid php notice.

  • Loading branch information...
1 parent 3907893 commit f9204ebe7cbf375131d99d8256aa2e4744c18f12 @renan renan committed Nov 26, 2009
Showing with 4 additions and 3 deletions.
  1. +4 −3 cake/dispatcher.php
View
@@ -611,8 +611,9 @@ function cached($url) {
App::import('View', 'Media', false);
$Media = new MediaView();
$ext = array_pop(explode('.', $url));
-
+
if (isset($Media->mimeType[$ext])) {
+ $pos = 0;
$parts = explode('/', $url);
if ($parts[0] === 'css' || $parts[0] === 'js' || $parts[0] === 'img') {
$pos = 0;
@@ -638,10 +639,10 @@ function cached($url) {
if (strpos($plugin, '/') !== false) {
list($plugin, $theme) = explode('/', $plugin);
$themePaths = App::path('views');
-
+
foreach ($themePaths as $viewPath) {
$path = $viewPath . 'themed' . DS . $theme . DS . 'webroot' . DS;
-
+
if ($plugin === 'theme' && (is_file($path . $url) && file_exists($path . $url))) {
$assetFile = $path . $url;
$matched = true;

0 comments on commit f9204eb

Please sign in to comment.