VBsupport перешел с домена .ORG на родной .RU
Ура!
Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей
Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже: Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота. Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
Сборник исправлений vBulletin 4.2.2 для работы на PHP 5.5.x
22
В данной теме собраны все найденные деприкейты и исправления vBullein 4.2.2 обеспечивающие работу движка на PHP 5.5.x. Пост будет периодически обновляться. Итак поехали:
Warning: Declaration of vBForum_Item_SocialGroupDiscussion::getLoadQuery() should be compatible with vB_Model::getLoadQuery($required_query = '', $force_rebuild = false) in ....\packages\vbforum\item\socialgroupdiscussion.php on line 337
В файле .\packages\vbforum\item\socialgroupdiscussion.php ищем:
PHP Code:
protected function getLoadQuery($required_query, $force_rebuild = false)
Заменяем:
PHP Code:
protected function getLoadQuery($required_query = self::QUERY_BASIC, $force_rebuild = false)
Warning: Declaration of vBForum_Item_SocialGroupMessage::getLoadQuery() should be compatible with vB_Model::getLoadQuery($required_query = '', $force_rebuild = false) in ....\packages\vbforum\item\socialgroupmessage.php on line 261
В файле .\packages\vbforum\item\socialgroupmessage.php ищем:
PHP Code:
protected function getLoadQuery($required_query, $force_rebuild = false)
Заменяем:
PHP Code:
protected function getLoadQuery($required_query = self::QUERY_BASIC, $force_rebuild = false)
Warning: Only variables should be passed by reference in ....\editpost.php on line 323
В файле .\editpost.php ищем:
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ....\includes\class_bbcode.php on line 2958
В файле .\includes\class_bbcode.php ищем:
PHP Code:
if ($has_img_code & BBCODE_HAS_IMG) { if ($do_imgcode AND ($this->registry->userinfo['userid'] == 0 OR $this->registry->userinfo['showimages'])) { // do [img]xxx[/img] $bbcode = preg_replace('#\[img\]\s*(https?://([^*\r\n]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_img_match('\\1')", $bbcode); } else { $bbcode = preg_replace('#\[img\]\s*(https?://([^*\r\n]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')", $bbcode); } }
return $bbcode; } protected function handle_bbcode_img_match_callback($matches) { return $this->handle_bbcode_img_match($matches[1]); }
protected function handle_bbcode_url_callback($matches) { return $this->handle_bbcode_url(str_replace('\\\"', '\"', $matches[1])); }
protected function handle_bbcode_sigpic_callback($matches) { return $this->handle_bbcode_sigpic($matches[1]); }
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_mail.php on line 473
В файле ./includes/class_mail.php ищем:
function strtoupper_callback($matches) { return '=' . strtoupper(dechex(ord(str_replace('\\"', '"', $matches[1])))); }
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ./includes/class_wysiwygparser.php on line 806
В файле ./includes/class_wysiwygparser.php ищем:
Warning: Declaration of vB_Image_Magick::fetch_image_info() should be compatible with that of vB_Image_Abstract::fetch_image_info() in ..../includes/class_image.php on line 1256
В файле ./includes/class_image.php ищем:
PHP Code:
function fetch_image_info($filename, $extension) {}
Заменяем:
PHP Code:
function fetch_image_info($filename, $extension = null) {}
Warning: Declaration of vB_ProfileBlock_Blog::block_is_enabled() should be compatible with that of vB_ProfileBlock::block_is_enabled() in ..../includes/class_profileblock_blog.php on line 436
В файле ./includes/class_profileblock_blog.php ищем:
PHP Code:
function block_is_enabled($id = '')
Заменяем:
PHP Code:
function block_is_enabled($id)
Warning: Only variables should be passed by reference in ./forumrunner/include/search.php on line 57
В файле ./forumrunner/include/search.php ищем:
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_bbcode_alt.php on line 522
В файле ./includes/class_bbcode_alt.php ищем:
Warning: Declaration of vBCms_Item_Content::setItemId() should be compatible with that of vB_Model::setItemId() in ..../packages/vbcms/item/content.php on line 26
В файле ./packages/vbcms/item/content.php ищем:
PHP Code:
public function setItemId($itemid = false)
Заменяем:
PHP Code:
public function setItemId($itemid)
Warning: Only variables should be passed by reference in ..../blog_post.php on line 496 when creating a new blog
В файле ./blog_post.php ищем:
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/functions_newpost.php on line 200
В файле ./includes/functions_newpost.php ищем:
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_block.php on line 442
В файле ./includes/class_block.php ищем:
PHP Code:
protected function get_pagetext_noquote($pagetext) { require_once(DIR . '/includes/functions_search.php');
//figure out how to handle the 'cancelwords' $display['highlight'] = array(); return preg_replace('#\[quote(=("|"|\'|)??.*\\2)?\](((?>[^\[]*?|(?R)|.))*)\[/quote\]#siUe', "process_quote_removal('\\3', \$display['highlight'])", $pagetext); }
Заменяем:
PHP Code:
protected function get_pagetext_noquote($pagetext) { require_once(DIR . '/includes/functions_search.php');
//figure out how to handle the 'cancelwords' $display['highlight'] = array();
$callback = new process_quote_removal_callback($display['highlight']);
class process_quote_removal_callback { private $display;
public function __construct($display) { $this->display = $display; }
public function callback($matches) { return process_quote_removal($matches[3], $this->display); } }
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_wysiwygparser.php on line 310
В файле ./includes/class_wysiwygparser.php ищем:
PHP Code:
$text = preg_replace(array( '#<pre(.*)>(.*)</pre>#esiU', '#<a href="([^"]*)\[([^"]+)"(.*)>(.*)\[\\2</a>#siU', // check for the WYSIWYG editor being lame with URL tags followed by bbcode tags '#(<[^<>]+ (src|href))=(\'|"|)??(.*)(\\3)#siUe' // make < and > safe in inside URL/IMG tags so they don't get stripped by strip_tags ), array( "\$this->replace_newline_in_pre('\\2')", '<a href="\1"\3>\4</a>[\2', // check for the browser (you know who you are!) being lame with URL tags followed by bbcode tags "\$this->escape_within_url('\\1', '\\4', '\\3')" // make < and > safe in inside URL/IMG tags so they don't get stripped by strip_tags ), $text );
// check for the WYSIWYG editor being lame with URL tags followed by bbcode tags // check for the browser (you know who you are!) being lame with URL tags followed by bbcode tags $text = preg_replace('#<a href="([^"]*)\[([^"]+)"(.*)>(.*)\[\\2</a>#siU', '<a href="\1"\3>\4</a>[\2', $text);
// make < and > safe in inside URL/IMG tags so they don't get stripped by strip_tags $text = preg_replace_callback('#(<[^<>]+ (src|href))=(\'|"|)??(.*)(\\3)#siU', array($this, 'escape_within_url_callback'), $text);
return $text;
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_wysiwygparser.php on line 402
В файле ./includes/class_wysiwygparser.php ищем:
PHP Code:
$pregfind = array ( '#\[(html|php)\]((?>[^\[]+?|(?R)|.))*\[/\\1\]#siUe', // strip html from php tags '#\[url=(\'|"|"|)<A href="(.*)/??">\\2/??</A>#siU' // strip linked URLs from manually entered [url] tags (generic) ); $pregreplace = array ( "\$this->strip_html_from_bbcode('\\0')", // strip html from php tags '[URL=$1$2' //`strip linked URLs from manually entered [url] tags (generic) ); $text = preg_replace($pregfind, $pregreplace, $text);
return $text;
[/PHP] Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_wysiwygparser.php on line 462
В файле ./includes/class_wysiwygparser.php ищем:
protected function replace_newline_in_pre_callback($matches) { return $this->replace_newline_in_pre($matches[2]); }
protected function escape_within_url_callback($matches) { return $this->escape_within_url($matches[1], $matches[4], $matches[3]); }
protected function translate_smilie_id_text_callback($matches) { return $this->translate_smilie_id_text($matches[1]); }
protected function handle_wysiwyg_img_callback($matches) { return $this->handle_wysiwyg_img($matches[2], $matches[0]); }
protected function strip_html_from_bbcode_callback($matches) { return $this->strip_html_from_bbcode($matches[0]); }
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_postbit.php on line 1033
В файле ./includes/class_postbit.php ищем:
class process_highlight_postbit_callback { public function __construct($highlight) { $this->highlight = $highlight; }
public function callback($matches) { return vB_Postbit_Post::process_highlight_postbit($matches[2], $highlight, $matches[1]); } }
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ....\includes\class_bbcode_alt.php on line 333
В файле .\includes\class_bbcode_alt.php ищем:
PHP Code:
if ($has_img_code == 1 OR $has_img_code == 3) { if ($do_imgcode AND ($this->registry->userinfo['userid'] == 0 OR $this->registry->userinfo['showimages'])) { // do [img]xxx[/img] $bbcode = preg_replace('#\[img\]\s*(https?://([^*\r\n]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_img_match('\\1')", $bbcode); } }
return $bbcode; }
Заменяем:
PHP Code:
if ($has_img_code == 1 OR $has_img_code == 3) { if ($do_imgcode AND ($this->registry->userinfo['userid'] == 0 OR $this->registry->userinfo['showimages'])) { // do [img]xxx[/img] $bbcode = preg_replace_callback('#\[img\]\s*(https?://([^*\r\n]+|[a-z0-9/\\._\- !]+))\[/img\]#iU', array($this, 'handle_bbcode_img_match_callback'), $bbcode); } }
return $bbcode; } protected function handle_bbcode_img_match_callback($matches) { return $this->handle_bbcode_img_match($matches[1]); }
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_bbcode_alt.php on line 1270
В файле ./includes/class_bbcode_alt.php ищем:
protected function parse_callback($matches) { if ($matches[1] >= 32 AND $matches[1] <= 127) { return chr($matches[1]); } else { return "&#" . $matches[1] . ";"; } }
Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../forumrunner/support/utils.php on line 735
В файле ./forumrunner/support/utils.php ищем:
if ($htmltrans) { $string = strtr($string, $trans_tbl); }
return $string; }
Добавляем ниже:
PHP Code:
class code2utf_callback { function callback1($matches) { return code2utf(hexdec($matches[1])); }
function callback2($matches) { return code2utf($matches[1]); } }
Warning: preg_match(): Compilation failed: invalid range in character class at offset 23 in ..../includes/class_wysiwygparser.php on line 481
В файле ./includes/class_wysiwygparser.php ищем:
PHP Code:
if (preg_match('#attachment.php\?attachmentid=(\d+)#si', $img_url, $matches) AND preg_match('#class=(\'|"|)([a-z0-9_-\s]+)?\s*previewthumb\s*([a-z0-9_-\s]+)?(\\1)#siu', $fullurl))
Заменяем:
PHP Code:
if (preg_match('#attachment.php\?attachmentid=(\d+)#si', $img_url, $matches) AND preg_match('#class=(\'|"|)([a-z0-9_-]+)?\s*previewthumb\s*([a-z0-9_-]+)?(\\1)#siu', $fullurl))
Last edited by UniversalUserIS : 04-24-2015 at 05:33 PM.
Скажите, а насколько актуальны эти исправления для PHP версии 5.4.29 ?
@UniversalUserIS
Специалист
Join Date: Jan 2013
Награды в конкурсах:
Posts: 447
Версия vB: 4.2.х
Reputation:
Professional 786
Репутация в разделе: 476
0
Quote:
Originally Posted by Kantauver
Скажите, а насколько актуальны эти исправления для PHP версии 5.4.29 ?
Практически эти исправления совсем не актуальны для PHP 5.4.x, поскольку vB 4.2.2 его официально поддерживает.
@eddstep
Простоузер
Join Date: Aug 2014
Posts: 1
Версия vB: 3.8.x
Reputation:
Novice 0
Репутация в разделе: 0
0
При исправлении includes\class_wysiwygparser.php согласно всем записям выше вылазит такое,
PHP Code:
Parse error: syntax error, unexpected 'protected' (T_PROTECTED) in C:\xampp\htdocs\***\www\includes\class_wysiwygparser.php on line 1763
если же убрать последнюю из исправлений
PHP Code:
protected function replace_newline_in_pre_callback($matches) { return $this->replace_newline_in_pre($matches[2]); }
protected function escape_within_url_callback($matches) { return $this->escape_within_url($matches[1], $matches[4], $matches[3]); }
protected function translate_smilie_id_text_callback($matches) { return $this->translate_smilie_id_text($matches[1]); }
protected function handle_wysiwyg_img_callback($matches) { return $this->handle_wysiwyg_img($matches[2], $matches[0]); }
protected function strip_html_from_bbcode_callback($matches) { return $this->strip_html_from_bbcode($matches[0]); }
выдает
PHP Code:
Warning: preg_replace_callback(): Requires argument 2, 'vB_WysiwygHtmlParser::replace_newline_in_pre_callback', to be a valid callback in ....\includes\class_wysiwygparser.php on line 301
Warning: preg_replace_callback(): Requires argument 2, 'vB_WysiwygHtmlParser::escape_within_url_callback', to be a valid callback in ....\includes\class_wysiwygparser.php on line 308
Warning: preg_replace_callback(): Requires argument 2, 'vB_WysiwygHtmlParser::strip_html_from_bbcode_callback', to be a valid callback in ....\includes\class_wysiwygparser.php on line 390
Warning: preg_replace_callback(): Requires argument 2, 'vB_WysiwygHtmlParser::translate_smilie_id_text_callback', to be a valid callback in ....\includes\class_wysiwygparser.php on line 450
Warning: preg_replace_callback(): Requires argument 2, 'vB_WysiwygHtmlParser::handle_wysiwyg_img_callback', to be a valid callback in ....\includes\class_wysiwygparser.php on line 453
eddstep добавил 20.08.2014 в 19:48
также предупреждение есть в помощи админа
PHP Code:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in C:\xampp\htdocs\vb422.local\www\admincp\help.php on line 234
Last edited by eddstep : 08-20-2014 at 07:48 PM.
Reason: Добавлено сообщение
@insideja
В Черном списке
Join Date: Dec 2009
Posts: 89
Версия vB: 4.2.х
Пол:
Reputation:
is infamous around these parts -146
Репутация в разделе: -147
0
[font color=red]Warning: Illegal string offset 'do' in ....\includes\functions_online.php on line 516[/font]
А решение такой ошибки есть? Возникает при просмотре онлайна.
Sellrion
Kernel panic
Join Date: Aug 2007
Location: Екатеринбург
Posts: 2,536
Версия vB: 3.8.x
Пол:
Reputation:
Гуру 1921
Репутация в разделе: 793
0
Это не ошибка а предупреждение. Можно не обращать внимания. А вообще, это обращение к элементу массива без проверки его наличия. Для VB4 это нормально.)
@Glopus
Знаток
Join Date: Jul 2011
Posts: 43
Версия vB: 4.2.х
Reputation:
Knowing 139
Репутация в разделе: 25
0
Было такое?
Luvilla
Гость
Posts: n/a
Quote:
Originally Posted by UniversalUserIS
совсем не актуальны для PHP 5.4.x, поскольку vB 4.2.2 его официально поддерживает.
я бы сформулировала не "официально", а "формально", или по-простому "кагбе"
поставила 4.2.2 на пхп 5.4, варнинги не давила, получаю удовольствие
===
Quote:
Originally Posted by Glopus
Было такое?
лучше бы просто текст, а не скрин...
кстати, текст можно бы и поискать в первом посте...
@Glopus
Знаток
Join Date: Jul 2011
Posts: 43
Версия vB: 4.2.х
Reputation:
Knowing 139
Репутация в разделе: 25
0
В первом посте не нашел, м.б. проглядел, поэтому и спрашиваю.
Можно и текстом: Warning: Declaration of vB_DataManager_StyleVarDefn::delete() should be compatible with vB_DataManager::delete($doquery = true) in ..../includes/class_dm_stylevar.php on line 233
Warning: Declaration of vB_DataManager_StyleVar::save() should be compatible with vB_DataManager::save($doquery = true, $delayed = false, $affected_rows = false, $replace = false, $ignore = false) in ..../includes/functions_log_error.php on line 615
@UniversalUserIS
Специалист
Join Date: Jan 2013
Награды в конкурсах:
Posts: 447
Версия vB: 4.2.х
Reputation:
Professional 786
Репутация в разделе: 476
0
@Glopus, версия PHP какая? Luvilla, на моей памяти у vB 4.2.2 на PHP 5.4.x было два предупреждения связанных с декларациями. Неужели их больше?