Pagina 1 van 1

Non-static method foutmelding

Geplaatst: 16 mei 2012, 18:21
door demon326
  • Adres van je forum: http://
    Event. modificaties op je forum: téveel op neer te pennen
    Wanneer ontstond het probleem? Sinds het begin
    phpBB versie:3.0.10


    Heb je onlangs iets veranderd aan je forum? Neen
    Wat is het probleem?
Voor onze drupal website sneller te laten werken maken wij gebruik van de authcache module, deze zal echter niet werken als er een php error/notice getoond word, in dit geval de volgende foutmelding:
Non-static method utf_normalizer::nfc() should not be called statically","file":"/var/www/clients/clientx/webx/web/forum/includes/utf/utf_tools.php","line":1781

De makers van de phpbb bridge verwijzen naar phpbb om dit probleem op te lossen..

Deze oplossing heb ik geprobeerd: http://www.phpbb.com/community/viewtopi ... #p13132078 maar dan geeft hij de foutmelding bij berichtplaatsen: Undefined variable: utfn

Re: Non-static method foutmelding

Geplaatst: 17 mei 2012, 00:10
door Pola
Het min of meer formele antwoord namens phpBB ontwikkeling is gegeven in de laatste twee berichten van dat topic, met een oplossing in het laatste bericht: http://www.phpbb.com/community/viewtopi ... #p13132367

Re: Non-static method foutmelding

Geplaatst: 17 mei 2012, 08:41
door demon326
Pola schreef:Het min of meer formele antwoord namens phpBB ontwikkeling is gegeven in de laatste twee berichten van dat topic, met een oplossing in het laatste bericht: http://www.phpbb.com/community/viewtopi ... #p13132367
Ik heb al gekeken, maar die oplossing geld enkel voor php 5.4.x >, terwijl ik de rot notice op 5.3.x krijg..... ;)

Re: Non-static method foutmelding

Geplaatst: 17 mei 2012, 10:32
door Paul
Die wijziging die Oleg daar plaatst werkt geeft als het goed is hetzelfde resultaat onder 5.3 als 5.4.

Re: Non-static method foutmelding

Geplaatst: 17 mei 2012, 10:50
door demon326
paul schreef:Die wijziging die Oleg daar plaatst werkt geeft als het goed is hetzelfde resultaat onder 5.3 als 5.4.
Dan zal ik het straks eens uitgebreid testen :)

Re: Non-static method foutmelding

Geplaatst: 17 mei 2012, 16:04
door demon326
Iemand anders heeft mij kunnen helpen...

Vind:

Code: Selecteer alles

unction utf8_normalize_nfc($strings)
{
	if (empty($strings))
	{
		return $strings;
	}

	if (!class_exists('utf_normalizer'))
	{
		global $phpbb_root_path, $phpEx;
		include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
	}

	if (!is_array($strings))
	{
		utf_normalizer::nfc($strings);
	}
	else if (is_array($strings))
	{
		foreach ($strings as $key => $string)
		{
			if (is_array($string))
			{
				foreach ($string as $_key => $_string)
				{
					utf_normalizer::nfc($strings[$key][$_key]);
				}
			}
			else
			{
				utf_normalizer::nfc($strings[$key]);
			}
		}
	}

	return $strings;
}
Vervang door:

Code: Selecteer alles

function utf8_normalize_nfc($strings)
{
	if (empty($strings))
	{
		return $strings;
	}

	if (!class_exists('utf_normalizer'))
	{
		global $phpbb_root_path, $phpEx;
		include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
	}
	
	$normalizer = new utf_normalizer();

	if (!is_array($strings))
	{
		$normalizer->nfc($strings);
	}
	else if (is_array($strings))
	{
		foreach ($strings as $key => $string)
		{
			if (is_array($string))
			{
				foreach ($string as $_key => $_string)
				{
					$normalizer->nfc($strings[$key][$_key]);
				}
			}
			else
			{
				$normalizer->nfc($strings[$key]);
			}
		}
	}

	return $strings;
}
Doe dit enkel en alleen als je versie php 5.3.x > is en als je dit probleem hebt..