blacksmoke26 / yii2cdn

A Yii Framework 2 component for using assets in different environments (Local/CDNs)
Apache License 2.0
14 stars 2 forks source link

Undefined index: preComponents when setup css and js component #8

Closed nikosid closed 6 years ago

nikosid commented 6 years ago

In my case I'm setting up two sections - js and css:

'jquery-fancybox' => [
                    'css' => [
                        [
                            'jquery.fancybox.min.css', // offline version
                            '@cdn' => '//cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.25/jquery.fancybox.min.css', // online version
                        ],
                    ],
                    'js' => [
                        [
                            'jquery.fancybox.min.js', // offline version
                            '@cdn' => '//cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.25/jquery.fancybox.min.js', // online version
                        ],
                    ],
                ],

and I'm getting an error Undefined index: preComponents in blacksmoke26/yii2cdn/src/Component.php:158 If I leave only one - css or js section in works good.

blacksmoke26 commented 6 years ago

Thanks! Will fix ASAP.

blacksmoke26 commented 6 years ago

@nikosid Can you please give me some information?

  1. Your PHP Version
  2. Yii2 version
  3. Template: Basic or Advance?
  4. OS name
  5. error_reporting value (PHP Settings)
blacksmoke26 commented 6 years ago

@nikosid Bugs fixed.

More info: https://github.com/blacksmoke26/yii2cdn/releases/tag/1.0.0

Tested with: PHP: 7.0.30, 7.1.19, 7.2.8 Yii2 Framework: 2.0.12, 2.0.15.1