Notifications
Clear all

Invalid Argument Warning

4 Posts
2 Users
0 Likes
494 Views
Posts: 2
Topic starter
(@frede)
New Member
Joined: 12 months ago

Hi, I'm getting a warning on the WP Plug-In page that says: " Invalid argument supplied for foreach() in /home/scrunner/www/www/wp-content/themes/Divi/core/components/Updates.php on line 753

Screenshot of affected line is attached, does anyone see the issue?

Thanks!

3 Replies
TinyWebGallery
Posts: 874
Admin
(@admin)
Prominent Member
Joined: 15 years ago

Please check the error message: /themes/Divi/

It is your theme where the problem comes from.

Best regards, Michael

Reply
Posts: 2
Topic starter
(@frede)
New Member
Joined: 12 months ago

Thanks.  I thought that I posted the code from that theme file.  Here's the code below, there is an invalid argument on the line with the "foreach" statement.  Anything obvious?

 

if ( false === $et_updated_plugins_data || ( $has_last_checked && $update_transient->last_checked !== $et_updated_plugins_data->last_checked ) ) {
$et_updated_plugins_data = new stdClass();

if ( ! empty( $update_transient->last_checked ) ) {
$et_updated_plugins_data->last_checked = $update_transient->last_checked;
}

foreach ( $update_transient->response as $response_plugin_settings ) {
$slug = sanitize_text_field( $response_plugin_settings->slug );

$et_updated_plugins_data->changelogs[ $slug ] = esc_url_raw( $response_plugin_settings->url . '?TB_iframe=true&width=1024&height=800' );
}

set_transient( 'et_updated_plugins_data', $et_updated_plugins_data );
}

Reply
TinyWebGallery
Posts: 874
Admin
(@admin)
Prominent Member
Joined: 15 years ago

You should post this to the theme forum. This is the wrong forum!

Reply