bląd functions_content.php

Tutaj możesz luźno podyskutować o skrypcie phpBB. To forum nie służy do zgłaszania problemów, wykrytych błędów czy pytań odnośnie modyfikacji i stylów.
foczka344
Posty: 1
Rejestracja: 28 sierpnia 2023, 16:00

bląd functions_content.php

Post autor: foczka344 » 07 września 2023, 14:51

Posiadam phpBB w wersji 3.0.12 przy tworzeniu pierwszej kategorii mam taki komunikat:

Kod: Zaznacz cały

[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 678: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
w tym pliku jest:

Kod: Zaznacz cały

function make_clickable($text, $server_url = false, $class = 'postlink')
{
	if ($server_url === false)
	{
		$server_url = generate_board_url();
	}

	static $magic_url_match;
	static $magic_url_replace;
	static $static_class;

	if (!is_array($magic_url_match) || $static_class != $class)
	{
		$static_class = $class;
		$class = ($static_class) ? ' class="' . $static_class . '"' : '';
		$local_class = ($static_class) ? ' class="' . $static_class . '-local"' : '';

		$magic_url_match = $magic_url_replace = array();
		// Be sure to not let the matches cross over. ;)

		// relative urls for this board
		$magic_url_match[] = '#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#ie';
		$magic_url_replace[] = "make_clickable_callback(MAGIC_URL_LOCAL, '\$1', '\$2', '\$3', '$local_class')";

		// matches a xxxx://aaaaa.bbb.cccc. ...
		$magic_url_match[] = '#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#ie';
		$magic_url_replace[] = "make_clickable_callback(MAGIC_URL_FULL, '\$1', '\$2', '', '$class')";

		// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
		$magic_url_match[] = '#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#ie';
		$magic_url_replace[] = "make_clickable_callback(MAGIC_URL_WWW, '\$1', '\$2', '', '$class')";

		// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
		$magic_url_match[] = '/(^|[\n\t (>])(' . get_preg_expression('email') . ')/ie';
		$magic_url_replace[] = "make_clickable_callback(MAGIC_URL_EMAIL, '\$1', '\$2', '', '')";
	}

	return preg_replace($magic_url_match, $magic_url_replace, $text);
}
akurat tych poleceń nie znam, można to przerobić, czy raczej aktualizacja?

vader
Moderator
Posty: 1502
Rejestracja: 19 kwietnia 2015, 14:44
Lokalizacja: Kraków
Kontakt:

Re: bląd functions_content.php

Post autor: vader » 18 września 2023, 07:38

Hej,

zakladam na serwerze masz wersję PHP, która 3.0.12 nie wspiera. A jeśli to pierwsza kategoria, to dopiero stawiasz forum? Nawet nie kontunuuj i zacznij od najnowszej wersji phpBB 3.3.10

ODPOWIEDZ

Wróć do „Dyskusje o phpBB”