nliautaud / p01contact

Create contact forms by writing simple tags. Also a plugin for GetSimple and Pico CMS.
MIT License
16 stars 15 forks source link

Warning: Creating default object from empty value #15

Closed pborowicz closed 6 years ago

pborowicz commented 6 years ago

PHP error on pages:

Warning: Creating default object from empty value in /home/public/plugins/p01-contact/src/P01contact.php on line 191

I pulled the latest version of this file from your github account, it was previously indicating line 210.

Issue goes away if I disable the hidden honeypot field.

nliautaud commented 6 years ago

Should be fixed in the repo.

The issue was related to the missing config object when no config.json file is present. Changing a setting (honeypot or another) create the config file, thus hiding the warning.

Could you confirm that it is fixed ?

pborowicz commented 6 years ago

That makes sense, it started working after I unchecked that. It didn't seem to matter if it was checked or unchecked.


From: Nicolas Liautaud notifications@github.com Sent: Saturday, October 21, 2017 7:19:03 AM To: nliautaud/p01contact Cc: Paul Borowicz; Author Subject: Re: [nliautaud/p01contact] Warning: Creating default object from empty value (#15)

Should be fixed in the repo.

The issue was related to the missing config object when no config.json file is present. Changing a setting (honeypot or another) create the config file, thus hiding the warning.

Could you confirm that it is fixed ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/nliautaud/p01contact/issues/15#issuecomment-338384495, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ac48DKogRrISlqgM7scUbGYZE-a2kvjyks5sudMngaJpZM4QAoc4.

nliautaud commented 6 years ago

Great, thanks for the feedback :)