ericmckean / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Page controller doesn't work #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Minify version: 2.1.2
PHP version: 5.2.8

What steps will reproduce the problem?
1. Minify a HTML page with the Page controller.
2.
3.

Expected output: Some HTML

Actual output: Exception that Mimify_CSS can't redeclared

Please provide any additional information below.
If I change the method loadMinifier in Minify_Controller_Page that it uses
require_once instead:
    public function loadMinifier($minifierCallback)
    {
        if ($this->_loadCssJsMinifiers) {
            // Minify will not call for these so we must manually load
            // them when Minify/HTML.php is called for.
->            require_once 'Minify/CSS.php';
->            require_once 'Minify/Javascript.php';
        }
        parent::loadMinifier($minifierCallback); // load Minify/HTML.php
    }
the exception goes away.

Original issue reported on code.google.com by joc...@joschs-robotics.de on 6 Apr 2009 at 10:27

GoogleCodeExporter commented 9 years ago
I revised my code and there were excess requires of Minify_CSS and 
Minify_Javascript,
so at the moment, the problem is solved.
Perhaps, it would be better to have Minify use require_once instead of require 
to
make it more robust.
From my perspective this ticket can be closed.

Bye Jochen

Original comment by joc...@joschs-robotics.de on 9 Apr 2009 at 9:38

GoogleCodeExporter commented 9 years ago
Thanks. Will change to require_onces.

Original comment by mrclay....@gmail.com on 11 Jun 2009 at 1:50

GoogleCodeExporter commented 9 years ago
Fixed in R326

Original comment by mrclay....@gmail.com on 30 Jun 2009 at 4:55