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

Michael Thompson picture Michael Thompson · Aug 21, 2012 · Viewed 7.2k times · Source

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

Strict Standards: 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 have tried to find an answer for this on the PHPBB boards but have had no luck. I have a bit of background in PHP but don't understand static function calls from dynamic ones. I am using PHP v5.4.4, Apache 2.4.2 and Xampp 1.8.0, if any of that is of relevance. I am also running this on my localhost, not on a remote server.

To induce this error, all I am doing is installing PHPBB. Once I have inserted the Database settings and the Admin account settings, it comes up with this error and won't allow me to continue. I have no extensions installed (ofcourse).

Also, I have not been able to find the nfc function in the file specified. I am unsure as to whether it's in an include though. I also searched inside all files for "function nfc" (excluding quotation marks), but found nothing, and so am unable to use this: Strict Standards: Non-static method STemplate::assign() should not be called statically . I am aware that this problem is common, and many people have claimed that a certain fix has worked for them, but I have been unable to apply these fixes because they were for earlier versions of PHPBB (i.e. 1.0.4).

I have been able to install PHPBB on localhost in the past, but not now. I currently have no working PHPBB installation.

Thanks for any help given.

Answer

mbeintema picture mbeintema · Sep 26, 2014

I know this is outdated, however rather than suppressing the issue

If you want to properly fix this at the root of the problem,

Open up 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 hasn't been fixed in a proper release