Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

wpForo 1.x.x [Closed] PHP Warning: Invalid argument supplied for foreach() in wpforo/wpforo.php on line 141

4 Posts
2 Users
0 Reactions
3,134 Views
Posts: 56
Topic starter
(@glowball)
Trusted Member
Joined: 8 years ago

I'm seeing the same PHP warnings in my log but I don't think there are any front end error messages:

PHP Warning:  Invalid argument supplied for foreach() in /my_home/public_html/wp-content/plugins/wpforo/wpforo.php on line 141 

This is the code and the foreach() it mentions:

public function phrases(){
if($this->general_options){
$phrases = $this->phrase->get_phrases( array( 'langid' => $this->general_options['lang'] ) );
foreach($phrases as $phrase){
$this->phrases[addslashes(strtolower($phrase['phrase_key']))] = $phrase['phrase_value'];
}
}
}

It's not urgent as there are no external symptoms, but what can I do to resolve the error? Thanks!

3 Replies
Robert
Posts: 10616
Admin
(@robert)
Support Team
Joined: 9 years ago

I think your the _wpforo_phrases table is empty. Please check it in database. If so, please navigate to Dashboard > Forums > Settings and upload this XML file (unzip before uploading).

Posts: 56
Topic starter
(@glowball)
Trusted Member
Joined: 8 years ago

It's not empty.  I've actually been changing phrases in the admin tool successfully, and that's working very well.  And thanks for providing that option, it's very easy to use.

Robert
Posts: 10616
Admin
(@robert)
Support Team
Joined: 9 years ago

Ok, check this and fix in next update.