Forum PHP Warning.

For discussions which are not directly related to MythTV.

Moderator: Forum Moderators

Post Reply
User avatar
Steve Goodey
Moderator
Posts: 221
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Forum PHP Warning.

Post by Steve Goodey »

Hello,

Just noticed the forum main page has a PHP Warning at the top.
[phpBB Debug] PHP Warning: in file [ROOT]/ext/rmcgirr83/nationalflags/core/nationalflags.php on line 219: array_count_values() expects parameter 1 to be array, bool given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/rmcgirr83/nationalflags/core/nationalflags.php on line 221: sizeof(): Parameter must be an array or an object that implements Countable
Anybody able to fix this? (Where's StuartA when you need him?) :D
Don't forget the Wiki.
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Forum PHP Warning.

Post by paulh »

StuartA hasn't been around for some time now. Not sure if he has left the project for good or is just really busy. The last time I spoke to him he had a new job and was spending time with the family.

The only other person I know of who still has access to the web server is David Hampton.
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Forum PHP Warning.

Post by paulh »

Found this possible cause and solution from a Russian forum post (they are talking about the National Flags extension)
In recent versions of PHP, this can occur when the cache for this extension is not yet available. You can try to fix it using this crutch:

Code:Select all

OPEN
[ROOT]/ext/rmcgirr83/nationalflags/core/nationalflags.php

FIND
$cached_user_flags = array_count_values($cached_user_flags);

REPLACE WITH
$cached_user_flags = $cached_user_flags ? array_count_values($cached_user_flags) : [];
User avatar
Steve Goodey
Moderator
Posts: 221
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: Forum PHP Warning.

Post by Steve Goodey »

Think I should have have kept me trap shut as for the last day it seems the problem has gone away. :roll:

Unless, of course, someone has fixed it? In which case thanks.
Don't forget the Wiki.
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Forum PHP Warning.

Post by paulh »

There was definitely a problem on the main index page, the one with the national flags on it the other day :? I did post to the private developer mailing list to make everyone aware of the problem. As is usual these days it didn't get much in the way of replies :( Only the two David's replied both saying they didn't update anything. No one has said they tried to fix anything so it's a mystery. One possibility is OSUOSL who now host the web servers updated PHP or something which caused the problem? Maybe the cache fixed it self over time and the problem just went away :idea:
User avatar
Steve Goodey
Moderator
Posts: 221
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: Forum PHP Warning.

Post by Steve Goodey »

Thanks Paul.
Don't forget the Wiki.
Post Reply