DevGroup-ru / yii2-http2-server-push

HTTP/2 server push support for Yii2 web application
MIT License
7 stars 4 forks source link

Exception when view's cssFiles array is null. #4

Closed ghost closed 7 years ago

ghost commented 7 years ago

I use the Pjax widget in my application. When requesting a fragment using pjax, the views cssFiles property is set to null.

This results in a thrown exception.

yii\base\ErrorException: implode(): Invalid arguments passed in /app/vendor/devgroup/yii2-http2-server-push/src/AutomaticServerPush.php:43
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleError(2, 'implode(): Inva...', '/app/vendor/dev...', 43, Array)
#1 /app/vendor/devgroup/yii2-http2-server-push/src/AutomaticServerPush.php(40): implode(' ', NULL)
#2 [internal function]: DevGroup\ServerPush\AutomaticServerPush->DevGroup\ServerPush\{closure}(Object(yii\base\Event))
#3 /app/vendor/yiisoft/yii2/base/Component.php(557): call_user_func(Object(Closure), Object(yii\base\Event))
#4 /app/vendor/yiisoft/yii2/web/View.php(174): yii\base\Component->trigger('endPage')
...
bethrezen commented 7 years ago

Please try latest dev version from this commit d7cae91

ghost commented 7 years ago

I just noticed. Thank you

bethrezen commented 7 years ago

@aaronschmied done, use version 1.0.1