The non-static method utf_normalizer :: nfc () should not be called statically

At the moment, I am installing PHPBB 3.0.10 and have this error:

Strict standards: the non-static method utf_normalizer :: nfc () should not be called statically in C: \ xampp \ htdocs \ PHPBB \ includes \ utf \ utf_tools.php on line 1781

I tried to find the answer for this on PHPBB boards, but no luck. I have a little experience working in PHP, but I do not understand static function calls from dynamic ones. I use PHP v5.4.4, Apache 2.4.2, and Xampp 1.8.0 if that matters. I also run this on my local host, and not on the remote server.

To cause this error, all I do is install PHPBB. After I inserted the database settings and the administrator account settings, it causes this error and will not allow me to continue. I have no installed extensions (of course).

In addition, I could not find the nfc function in the specified file. I'm not sure if this is all included. I also searched in all files for "function nfc" (excluding quotation marks), but didnโ€™t find anything and therefore canโ€™t use it: Strict standards: the non-static method STemplate :: assign () should not be called statically , I know this problem is common , and many people claimed that a certain fix works for them, but I could not apply these fixes because they were for earlier versions of PHPBB (i.e. 1.0.4).

I was able to install PHPBB on localhost in the past, but not now. I currently do not have a working installation of PHPBB.

Thanks for the help provided.

+4
source share
3 answers

go to the / includes folder and open startup.php

At line ~ 22, change the line

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); 

to

 error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT); 

This may solve your problem =).

+7
source

I know this is outdated, however, instead of overwhelming the problem

If you want to fix it right at the root of the problem,

Open includes / utf / utf _tools.php

Go to line 1663

Replace

 utf_normalizer::nfkc($text); 

WITH

 $utf_normalizer = new utf_normalizer(); $utf_normalizer->nfkc($text); unset($utf_normalizer); 

I'm still not sure why this has not been fixed in the correct version

+10
source

Today I encountered a similar problem after upgrading to version 3.0.12, and I believe that the correct solution is to statically execute all functions in utf_normalizer.php instead of making non-static all calls to these functions. By the way, how is this done in phpbb 3.1.1

+2
source

All Articles