#37149 closed defect (bug) (invalid)
PHP Warning raised from plugin.php on line 235
Reported by: | nodeleaf | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.6 |
Component: | Plugins | Keywords: | |
Focuses: | Cc: |
Description
Apache error log is recording the very same persistent error on every client connections:
PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'return "";' not found or invalid function name in /.../wp-includes/plugin.php on line 235
This error is filling about 99% of this production server's errors log file making critical errors more difficult to track and address: an heavy cost to pay if this was really about a missing return ""; PHP statement.
I am now using 4.5.3 but the issue is older than that as this error is logged repetively from many months.
Change History (3)
#1
@
8 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
#2
follow-up:
↓ 3
@
8 years ago
It was in the theme:
add_filter('the_generator','return "";');
Replaced by:
add_filter('the_generator',create_function('$a','return "";'));
Thank you for your suggestion.
#3
in reply to:
↑ 2
@
8 years ago
Replying to nodeleaf:
It was in the theme:
add_filter('the_generator','return "";');
Replaced by:
add_filter('the_generator',create_function('$a','return "";'));
Thank you for your suggestion.
FYI, core has utility functions you can use as callbacks in this sort of situation ;)
<?php add_filter( 'the_generator', '__return_empty_string' );
This is likely coming from a plugin or theme you're running on your site.
It'll be caused by a plugin/theme doing something such as
add_action( 'something', 'return "";' );
which is invalid usage of the function - I'd suggest you search for it by searching for thereturn "";
string on your site.