2018-07-28, 11:35 PM
Hello
I have just installed MyBB Version 1.8.17 (Database created on Godaddy host: MySQL version 5.0 ) and I am in the process of testing it.
I get this syntax error whenever I try to post a thread:
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/content/59/8920259/html/forummyBB/inc/datahandlers/post.php on line 264
Is this a known error?
Here is the code, starting on line 260 of post.php
// If database is mysql or mysqli check field type and set max database limit
if(stripos($db->type, 'my') !== false)
{
$fields = $db->show_fields_from("posts");
$dblimit = reset(array_filter(array_map(function($field)
{
if($field['Field'] == 'message')
{
switch(strtolower($field['Type']))
{
case 'longtext':
return 4294967295;
break;
case 'mediumtext':
return 16777215;
break;
case 'text':
default:
return 65535;
break;
}
}
}, $fields)));
}
Thank you for your help.
I have just installed MyBB Version 1.8.17 (Database created on Godaddy host: MySQL version 5.0 ) and I am in the process of testing it.
I get this syntax error whenever I try to post a thread:
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/content/59/8920259/html/forummyBB/inc/datahandlers/post.php on line 264
Is this a known error?
Here is the code, starting on line 260 of post.php
// If database is mysql or mysqli check field type and set max database limit
if(stripos($db->type, 'my') !== false)
{
$fields = $db->show_fields_from("posts");
$dblimit = reset(array_filter(array_map(function($field)
{
if($field['Field'] == 'message')
{
switch(strtolower($field['Type']))
{
case 'longtext':
return 4294967295;
break;
case 'mediumtext':
return 16777215;
break;
case 'text':
default:
return 65535;
break;
}
}
}, $fields)));
}
Thank you for your help.