diff --git a/cake/dispatcher.php b/cake/dispatcher.php index cb3d20287..999648d29 100644 --- a/cake/dispatcher.php +++ b/cake/dispatcher.php @@ -605,7 +605,8 @@ class Dispatcher extends Object { $this->_stop(); } App::import('View', 'Media', false); - $Media = new MediaView(); + $controller = null; + $Media = new MediaView($controller); $ext = array_pop(explode('.', $url)); if (isset($Media->mimeType[$ext])) { diff --git a/cake/libs/view/media.php b/cake/libs/view/media.php index d181fd8d9..085ba91da 100644 --- a/cake/libs/view/media.php +++ b/cake/libs/view/media.php @@ -17,7 +17,9 @@ * @since CakePHP(tm) v 1.2.0.5714 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -class MediaView { +App::import('View', 'View', false); + +class MediaView extends View { /** * Holds known mime type mappings @@ -90,7 +92,8 @@ class MediaView { * * @param object $controller */ - function __construct($controller = null) { + function __construct(&$controller = null) { + parent::__construct($controller); } /**