Hi @xemita,
Thank you for reporting this.
We would like to clarify that Advanced IP Blocker is fully compatible with PHP 8.1+. However, for the best security and performance standards, we always recommend keeping your server updated to the latest stable versions (currently PHP 8.3 or 8.4).
We have double-checked our codebase regarding header handling and have not identified any direct function calls that would pass a
null
value in a standard environment. This suggests the warning might be triggered by a conflict with another active plugin, your current theme, or a specific server configuration interacting with the request.
Unfortunately, without seeing the full context, it is difficult to pinpoint the exact source of this conflict. Important: Since this is a public forum, we strongly advise against posting your full stack trace or error log here, as it may contain sensitive information about your server structure.
If you are able to isolate the specific filename and line number where the warning originates (without sharing the full path), please let us know, and we will be happy to investigate further.
Best regards,
Advanced IP Blocker Team
Thread Starter
xemita
(@xemita)
Hi, I’m using 8.3.
The error originates from your plugin’s interaction with wp-includes/functions.php on line 1485.
The “Deprecated” warning specifically triggers when your plugin calls a WordPress header function with a null value. If you check your code for where you hook into wp_headers or where you trigger a block, you will find the source.
I don’t have the internal trace of your plugin files, but since the error only appears when activating Advanced IP Blocker, the fix must be in your header-handling logic for PHP 8.3.
Best regards.
-
This reply was modified 4 months, 2 weeks ago by
xemita.
Hi @xemita,
You nailed it! Thank you so much for the detailed report.
After a deep code review following your lead, we identified that our hook on status_header was indeed registered as an add_action (which returns void/null) instead of an add_filter (which expects a return value). This was causing the chain break in PHP 8.1+ environments.
Status:
We have already fixed this in our development branch. The patch will be included in version 8.7.2, which is scheduled for release within the next 24 hours after final testing.
Thanks again for your expert contribution to the project!
Best regards,
Advanced IP Blocker Team
Hi @xemita,
Version 8.7.2 is now available and fixed.
Thank you.
Thread Starter
xemita
(@xemita)
Hi,
The previous fix cleared the header error, but now the plugin is triggering a new warning:
PHP Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in /wp-admin/admin-header.php on line 41
This happens because the plugin is passing a null value to a string parameter in the admin header (likely a page title or a notification message). Please ensure that all strings passed to WordPress admin functions are initialized as empty strings "" instead of null.
Best regards.
Hi @xemita,
Thanks again for the heads-up.
You are absolutely right: the issue is that WordPress is trying to process a page title that resolves to
null
through
strip_tags()
.
We traced this back to how our hidden “Setup Wizard” page was being registered. We were using an empty string
''
as the parent slug, which in some environments causes WordPress to fail to retrieve the correct Page Title global, leading to that
null
value in the header.
We have updated the code to use
null
explicitly for the parent slug, which is the strictly correct Standard for checking hidden pages in WordPress. This ensures the Page Title is correctly registered and retrieved, preventing the deprecated warning.
Status: This fix is committed and will be included in the upcoming release (8.8.1) scheduled for the next 24-48 hours. Since these are Deprecated warnings and not fatal errors, they shouldn’t affect the site’s functionality in production environments with
WP_DEBUG
disabled.
Best regards
Just a quick question:
Which PHP version are you currently running?
We always test all releases before publishing them on the latest PHP versions (8.3 and 8.4), and we haven’t found any related entries in either the PHP error logs or the WordPress WP_DEBUG logs.
Thread Starter
xemita
(@xemita)
Hi,
I am running PHP 8.3.30.
As you suspected, the warning appears specifically right after installation, at the moment of activation or when first accessing the plugin’s dashboard.
Thank you for the quick investigation and congrats on finding the root cause. It’s great to see a dev team so committed to keeping the code clean for the latest PHP versions. I look forward to version 8.8.1.
Best regards.