You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I stumbled upon this minor issue, which might be nothing to worry about, but I'll nevertheless report it 😸
I'm running Customizr (actually Pro, version 2.4.27, but the file mentioned in the logs is exactly the same), running WordPress 6.7.1 under Nginx 1.27.1 and PHP 8.3.16 (and MariaDB 10.11.8).
While apparently harmless, line 384 of core/class-fire-plugins_compat.php was throwing the error Trying to access array offset on null. Usually that kind of error comes from old code, where it was assumed that null would evaluate as zero, thus having the array return the first element; this hasn't worked for a while any longer (but just drops a warning).
Nevertheless, I hate warnings on the logs, so I essentially changed the isset() conditional a few lines before (which will be true even if the object is null) to a !empty() conditional — which will be false, if the object is unset, null, or empty. Usually, that's more than enough to deal with most issues.
Curiously enough, I now get a new warning:
2025/01/25 20:11:20 [error] 923987#923987: *4471134 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key
"tc_social_in_sidebar_title" in /var/www/wp-content/themes/customizr-pro/core/class-fire-plugins_compat.php on line 384;
PHP message: PHP Warning: Trying to access array offset on null in /var/www/wp-content/themes/customizr-pro/core/class-fire-plugins_compat.php on line 384"
while reading response header from upstream, client: XXX.XXX.XXX.XXX, server: example.com, request: "POST /wp-admin/admin-ajax.php HTTP/2.0",
upstream: "fastcgi://unix:/var/lib/php8.3-fpm/web.sock:", host: "example.com", referrer: "https://example.com/about/"
This requires a bit more deep thinking. What exactly is tc_social_in_sidebar_title and where did it come from?
As far as I can see — based on multiple installations I've got of Customizr (Pro), it is related to the Nimble Builder. I don't have many sites actively using the Nimble Builder, though. I'm now assuming that this is an option set at some point on this site, and which I might have deleted. And, indeed, when navigating to the WP customiser, there are options for placing social links on the sidebar. However, I placed them only on the footer. But maybe (I'm just making this up, I don't really remember...) I might have tweaked those settings, a long, long time ago, and this is just a 'ghost' entry still on the options (there is surely something there!) which was never properly removed.
I did tweak those settings for the social links, saved and published the changes again. There was no difference, at least on the logs. Therefore, whatever is causing this warning to show up in the logs, it's not as trivial as I thought. That's also why I didn't simply submit a PR here on GitHub with the proposed change(s) — as far as I know, it's not that easy to 'fix' as I thought.
Dos any of the above sound familiar to you? If so, how did you fix things on your side?
Thanks in advance for any insights!
The text was updated successfully, but these errors were encountered:
Hi there,
I stumbled upon this minor issue, which might be nothing to worry about, but I'll nevertheless report it 😸
I'm running Customizr (actually Pro, version 2.4.27, but the file mentioned in the logs is exactly the same), running WordPress 6.7.1 under Nginx 1.27.1 and PHP 8.3.16 (and MariaDB 10.11.8).
While apparently harmless, line 384 of
core/class-fire-plugins_compat.php
was throwing the errorTrying to access array offset on null
. Usually that kind of error comes from old code, where it was assumed that null would evaluate as zero, thus having the array return the first element; this hasn't worked for a while any longer (but just drops a warning).Nevertheless, I hate warnings on the logs, so I essentially changed the
isset()
conditional a few lines before (which will be true even if the object is null) to a!empty()
conditional — which will be false, if the object is unset, null, or empty. Usually, that's more than enough to deal with most issues.Curiously enough, I now get a new warning:
This requires a bit more deep thinking. What exactly is
tc_social_in_sidebar_title
and where did it come from?As far as I can see — based on multiple installations I've got of Customizr (Pro), it is related to the Nimble Builder. I don't have many sites actively using the Nimble Builder, though. I'm now assuming that this is an option set at some point on this site, and which I might have deleted. And, indeed, when navigating to the WP customiser, there are options for placing social links on the sidebar. However, I placed them only on the footer. But maybe (I'm just making this up, I don't really remember...) I might have tweaked those settings, a long, long time ago, and this is just a 'ghost' entry still on the options (there is surely something there!) which was never properly removed.
I did tweak those settings for the social links, saved and published the changes again. There was no difference, at least on the logs. Therefore, whatever is causing this warning to show up in the logs, it's not as trivial as I thought. That's also why I didn't simply submit a PR here on GitHub with the proposed change(s) — as far as I know, it's not that easy to 'fix' as I thought.
Dos any of the above sound familiar to you? If so, how did you fix things on your side?
Thanks in advance for any insights!
The text was updated successfully, but these errors were encountered: