MyBB Community Forums

Full Version: 1.8.15 php7.2 admin modlog tool fatal error fix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all 

so admin modlog tool was causing a fatal error due to syntax error

url -> /admin/index.php?module=tools-modlog

folder -> admin/modules/tools

open modlog.php


find

$plugins->run_hooks("admin_tools_modlog_modlogs_result")

change

$plugins->run_hooks("admin_tools_modlog_modlogs_result");
Thanks for posting. This can be helpful for some users Smile

However this was reported earlier ... [GitHub reference]
obviously the bug is related to all versions of php

though not related to this, if you are using php 7.2 for MyBB then I'd
suggest to downgrade your php to 7.1.x or 7.0.x as MyBB 1.8.15
is not fully compatible with php 7.2.x
(2018-03-29, 12:54 PM).m. Wrote: [ -> ]Thanks for posting. This can be helpful for some users Smile

However this was reported earlier ...
obviously the bug is related to all versions of php

though not related to this, if you are using php 7.2 for MyBB then I'd
suggest to downgrade your php to 7.1.x or 7.0.x as MyBB 1.8.15  
is not fully compatible with php 7.2.x

I have updated the entire server infrastructure for mybb versions 1.9 and 2.0. I made my mistake?

Im using 7.2.3. I have not encountered a different problem yet. upgrade 1.6.18 to 1.8.15 just got one mysql error and fix add to this line in mysql conf.
[mysqld]

sql_mode=''


7.2.x fully compatible it should not be too difficulty please speed up a developing.

default theme not support to responsive design. Do not mention the "themes" others are always working incorrectly except the default theme. I love MyBB but I'm concerned about the future.

please add the url seo feature with simple title filtering. The Google Seo  plugin is very complex and tons of error with php7.x

simply title filter
<?php function seo_clean_title($title, $title_type = 't')
{
	
	// do the replacements and return encoded url
	$title = str_replace("&amp;", "&", $title);
	$title = preg_replace("/&([a-z]+);/", "", $title); // remove html entities such as &amp; &quot etc..
	$title = preg_replace("/&#([0-9]+);/", "", $title); // remove entities like !
	
$title = str_replace(array('Ç','ç','Ğ','ğ','ı','İ','Ö','ö','Ş','ş','Ü','ü'), array('c','c','g','g','i','i','o','o','s','s','u','u'),  $title); 
	
	// added in BETA 9, to fix issues with some latin characters
		$title = utf8_encode($title);
		$is_utf8 = 1;
	
	// translate accents -- and maybe remove few non-ascii characters too, while on it..
	$title = preg_replace('#&([a-zA-Z])(circ|uml|grave|tilde|acute|cedil|ring|th);#', '\\1', htmlentities($title, null, 'utf-8'));
	$title = preg_replace("/&([a-z]+);/", "", $title);
	
	if ($is_utf8 == 1) {
		$title = utf8_decode($title);
	}
	
	// might be something like jackal's, we don't want it to be jackal-s
	$title = str_replace("'", '', $title);
	
	$title = str_replace(
			array(":", "?", ".", "!", "$", "^", "*", ",", ";", '"', "%", "~", "@", "#", "[", "]", "<", ">", "\\", "/", "=", "+", "(", ")"), "-", $title);
	
	$title = str_replace(array('_', " ", "&"), array("-", "-", "and"), $title);
	
	// remove multiple separators
	$title = preg_replace("#-{2,}#", "-", $title);
	// remove ending - if needed
	if (substr($title, -1) == '-') {
		$title = substr($title, 0, -1);
	}	
		$title = strtolower($title);
		
	
	return rawurlencode($title);
}
echo seo_clean_title("title string");