aradianoff / recaptchacontact

reCaptcha Contact Plugin for Grav CMS (getgrav.org)
MIT License
8 stars 11 forks source link

Error after Update #6

Closed ghost closed 9 years ago

ghost commented 9 years ago

See screenshot ... Suggestions?

screen shot 2015-08-31 at 9 12 01 pm

aradianoff commented 9 years ago

You need PHP 5.5 or higher for it to work (see README.MD). I am out of the computer right now, but if you can't update your php version I will look into it and tell you how to change the problematic line of code later. On Sep 1, 2015 04:18, "B.A. Umberger" notifications@github.com wrote:

See screenshot ... Suggestions?

[image: screen shot 2015-08-31 at 9 12 01 pm] https://cloud.githubusercontent.com/assets/5008228/9594812/b6a3292a-5025-11e5-962a-f6fdc3095cad.png

— Reply to this email directly or view it on GitHub https://github.com/aradianoff/recaptchacontact/issues/6.

aradianoff commented 9 years ago

Since v 1.0.6 this line in recapthcha.php causes the plugin to depend on php 5.5. Previous versions of PHP will cause the plugin to break. If you have a previous PHP version just substitute the !empty($this->grav['page'] ->collection()) in line 61 for $this->grav['page'] ->collection()!=[]. Future releases of this plugin will already include this change to allow compatibility with the previous versions.

aradianoff commented 9 years ago

I just released a new version that I think allows PHP 5.4.

ghost commented 8 years ago

I will update and let you know ... THX!

ghost commented 8 years ago

The update did not work. Same error.

ghost commented 8 years ago

However, once I update to PHP 5.5 all is well :)

Tele-Pet commented 8 years ago

I believe I was getting a similar error since updating to GRΛV 0.9.4.0, reCAPTCHA 1.0.7:

Whoops\Exception\ErrorException thrown with message "Can't use method return value in write context"

Stacktrace:
#0  in /.../plugins/recaptchacontact/recaptchacontact.php:88

Just like @umbergerba, updating PHP to 5.5 (specifically for me, php 5.5 FastCGI) resolved the issue.

aradianoff commented 8 years ago

Thanks, Tele-Pet. I had forgot ln.88 used the same expression that gave problems with older PHP versions. I changed that line so that now I think it is really backwards compatible with PHP 5.4 in the next update. :smile: