PHP warning on some pages
-
Hello,
I’ve noticed this PHP warning in my server error log:
PHP Warning:
Attempt to read property "ID" on null
in ./wp-content/plugins/beaver-builder-lite-version/classes/class-fl-builder-ui-settings-forms.php
on line 92I haven’t been able to determine the specific page layout/logic that triggers this PHP warning, but I was able to fix it by adding
FLBuilderModel::is_builder_active()check at the beginning ofFLBuilderUISettingsForms::enqueue_settings_config()method.So, basically, I’ve changed the method from:
/**
* Adds an inline script for general settings config and
* one for module settings config.
*
* @since 2.0.7
* @return void
*/
static public function enqueue_settings_config() {
global $wp_the_query;
global $post;
...to:
/**
* Adds an inline script for general settings config and
* one for module settings config.
*
* @since 2.0.7
* @return void
*/
static public function enqueue_settings_config() {
if ( ! FLBuilderModel::is_builder_active() ) {
return;
}
global $wp_the_query;
global $post;
...This fixed the issue for me.
Please consider adding this check in the next plugin update. Thank you!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.