PHP Warning line 552 in sp-api-class-spcdb.php
-
I was warned that I was using PHP7.3 and should go to 7.4.
I got message after going to 7.4 messing up my pages.
back to 7.3.
Theme used HULK latest version.
-
So, to clarify:
1. You have a fresh install of WordPress on Linux.
2. Debug flags are off
3. No plugins are active
4. The theme is the default WP theme
5. You install Simple:Press and activate it.And you see that message?
Is that the sequence of things?
Thanks.
Hi
That is the sequence! The message appears on every screenpage of the site and WP admin screens as long as S:P plugin is active.
JacobHi:
We’ve never seen this before or have a report of it before. But, just to be sure, we just ran through the same sequence on a few different servers and hosts and have been unable to replicate the issue.
I’m not sure what to suggest to you. Maybe the issue is some sort of configuration with the local install – we usually certify and test against real servers, not local installations. So it could be an XAMPP specific issue (is that what you’re still using – you mentioned that in a prior message)?
Maybe try installing it on a non-local server at a regular hosting provider and see if the same issue occurs?
Thanks.
Hi,
As we saw in this conversation there could be another plugin playing up. I removed the Widget-Entries plugin. However this did not help.
So I created a complete fresh WP site – all fresh downloads. installed S:P plugin and activated it.
Warning message appeared on activation. Newly created forum ok.
PHP is 7.4.7.
Q: Is this a PHP or a S:P problem.
I have no idea how to tackle this problem further.
Jacob.hmmm…what host are you using and which plan? We can probably try getting a plan there of our own and trying it out to see if we can duplicate the issue.
Thanks.
Hi
For the excersize this was the scenario:
– Desktop, W 10 Home 1909.
– Download XAMPP: xampp-windows-x64-7.4.7-0-VC15 + clean install
– Download WP: wordpress-5.4.2-nl_NL.zip + unzip -> xampp/htdocs/kaalwp
– Install WP: create DB, login to new site. WP2020 theme updates to last version.
– New plugin: Simple:Press download + install
– Activate Simple:Press plugin.
– Upon activation warning appears: Warning: Creating default object from empty value in G:\xampp\htdocs\kaalwp\wp-content\plugins\simplepress\sp-api\sp-api-class-spcdb.php on line 552
– Warning appears on top of every page! Creation of new forum ok.
– On logout following URL appears in browser: http://localhost/kaalwp/wp-login.php?action=logout&_wpnonce=df45cfd637
– Warning message appears with comment: You try to logout from Zweeftest (given name of site during WP Install) Are you sure you want to logout?Hope this info is what you want.
Regards, Jacob.Hi:
Thanks. Can you replicate the problem on a real host (not a local development machine)? That way we can use the same host to try to replicate the issue as well. Let us know which host and plan and we’ll purchase the same plan and try it.
Thanks.
Hi
I do not have a domain available. All development and issues are usually solved on my local machine.
I am out of options! Sorry.Changing live site (fully updated) via Direct Admin from PHP7.3 to PHP7.4 introduces the problem as it does locally.
Until this problem is solved I will remain on PHP7.3Please note that I will investigate further. Any new development in this matter I will bring to your attention.
Regards Jacob
Thanks for the update. I guess we’ll wait to see if anyone else encounters and reports the same issue and we get more data to work with on a regular host.
Hi:
We spent some more time taking a look at this. While we can;t reproduce the issue where the warnings go to the screen on a fresh install, we were able to get similar warnings going into the debug.log file.
If you’d like to apply the fix to your installation it’s located here: https://github.com/simple-press/simple-press/commit/e56ee76a06c2ac07735947b5a934606308c3fcd9
You can either just add the lines into the file or you can just replace the file completely since nothing else has changed between 6.5.1 and this change.
Hi again,
Thanks so much for the fix. I first applied it to my localhost and the problem vanished there. Then to our live site domain and now I am pleased to let you know that it also works fine in that environment.
This problem can now be closed.
Regards, Jacob.Great – glad to hear it!
The topic ‘PHP Warning line 552 in sp-api-class-spcdb.php’ is closed to new replies.