Errors on PHP 7.2

Please report bugs here!

Moderator: Thorsten

Post Reply
tomperys
Posts: 67
Joined: Tue May 14, 2013 10:17 am

Errors on PHP 7.2

Post by tomperys »

We have latest myfaq 2.9.13 on PHP 7.2 and there are some errors when we activate the bootstrap debug mode (which we need to if we want to use our own PHP pages - at least so we were told). Here are some of them we encounter so far.

List of warnings on homepade:
  • phpMyFAQ deprecated warning [8192]: The each() function is deprecated. This message will be suppressed on further calls in ..../www/inc/PMF/Init.php on line 148
  • phpMyFAQ warning [2]: count(): Parameter must be an array or an object that implements Countable in ..../www/inc/PMF/User.php on line 207
  • phpMyFAQ warning [2]: count(): Parameter must be an array or an object that implements Countable in ..../www/inc/PMF/Category.php on line 452
Issues on the backend:
  • Besides the same errors that are on the front page, there is also this warning: phpMyFAQ warning [2]: count(): Parameter must be an array or an object that implements Countable in ..../www/inc/PMF/Category.php on line 452 that appears when we open the Editing of posts
  • The "DEBUG INFORMATION:" are outputed over the list of posts cathegories in Editing of posts, so are not able to get to all posts to edit them
  • When we tried to edit some post and save the changes, we get error in chrome browser (lates version 72.0.3626.109 on WIN 10 Pro) - ERR_BLOCKED_BY_XSS_AUDITOR - but strange thing is we are not able to replicate same issue in Firefox browser or our dev site which is 1:1 copy made few minutes ago and running on same server just under different trird level domain name. Have no clue why it doest appear on the dev site... But I guess it could be related with that "XSS vulnerabilities fix" annouced in 2.9.13 ??? One more error that showed up after refresh from this XSS error was Fatal error: Unsupported operand types in .../www/admin/record.save.php on line 113
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Errors on PHP 7.2

Post by Thorsten »

Hi,

I can fix these warnings, but maybe there will never be a 2.9.14 release, depends on how fast v3.0 will be ready for production.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
tomperys
Posts: 67
Joined: Tue May 14, 2013 10:17 am

Re: Errors on PHP 7.2

Post by tomperys »

Its ok I manage to fix them all,
I just wanted to point them out also because of the nex release (so I do not have to fix it again after some update) :-)
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Errors on PHP 7.2

Post by Thorsten »

Hi,

can you provide a pull request on GitHub?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
tomperys
Posts: 67
Joined: Tue May 14, 2013 10:17 am

Re: Errors on PHP 7.2

Post by tomperys »

I could try, Iam not using the Github much so I will have to look how to do that.
Anyway I manage to "fix" the common warnings except the "Fatal error: Unsupported operand types in .../www/admin/record.save.php on line 113" because I wasnt able to simulate this one

And about that deprecated each() function, I just replaced it with foreach. Looks it was used for cleaning the tmp fiels when uploading so I tried to upload few documents and eevrything was fine. Juts in one case there was suddenly the login form again after hiting save post button. Iam not sure if there was some session problem, because I was logged in just few minutes back so it was weird.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Errors on PHP 7.2

Post by Thorsten »

Hi,

yes, foreach() should be used instead of each().

I'll check these issues in the 3.0 branch.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply