yii2-podium icon indicating copy to clipboard operation
yii2-podium copied to clipboard

podium crashes on php 5.4

Open eLFuvo opened this issue 7 years ago • 2 comments

I.m using now 5.4.45 version of PHP. After install I had seen the following error:

PHP Compile Error – yii\base\ErrorException

Can't use function return value in write context

...
/vendor/bizley/podium/src/models/db/ThreadActiveRecord.php:147

public function requiredPollAnswers()
    {
        if ($this->pollAdded) {
            $this->pollAnswers = array_unique($this->pollAnswers);
            $filtered = [];
            foreach ($this->pollAnswers as $answer) {
->                if (!empty(trim($answer))) {
   

Same error in /vendor/bizley/podium/src/models/db/PollActiveRecord.php:89

Please fix it.

Thanks for you greate work!

eLFuvo avatar May 25 '17 16:05 eLFuvo

BTW, Yii2 works on 5.4, but this PHP version is end of life now. http://php.net/supported-versions.php so IMHO is not a crime to ignore it :-)

tomaszkane avatar May 25 '17 20:05 tomaszkane

Yes, but unfortunately as long as Yii 2.0.* supports this I must as well. With 2.1.* we are back to sanity.

bizley avatar May 26 '17 05:05 bizley