[solved] Warning [2] Undefined variable $comma - Line: 1 - File: index.php(139)
#1
MyBB 1.8.38 + PHP 8.3.7 + BootBB style shows on home page (domain.tld/):

Quote:Warning [2] Undefined variable $comma - Line: 1 - File: index.php(139) : eval()'d code PHP 8.3.7 (Linux)

/inc/class_error.php
line 153
function errorHandler->error

/index.php(139) : eval()'d code
line 1
function errorHandler->error_callback

/index.php
line 139
function eval

/inc/class_error.php 153:

Quote:function error_callback($type, $message, $file=null, $line=0)
{
return $this->error($type, $message, $file, $line);
}

/index.php 139:
Quote:// Properly format the username and assign the template.
$user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);
$user['profilelink'] = build_profile_link($user['username'], $user['uid']);
eval('$onlinemembers[] = "'.$templates->get('index_whosonline_memberbit', 1, 0).'";');

I have made sure to re-upload both mentioned files from original mybb_1838 package, yet it does not help. I have latest BootBB style (updated 37 days ago) by @panayot . My board has been recently updated from version 1.6. What to try please?
Avoid Google and use Proton.me and uBlock origin ad/tracker blocker. Use open source system (Linux) and private apps.
Reply
#2
I know this warning with BootBB

two solutions:
deactivate warnings in ACP --> Configuration --> Server & Optimization Options --> Error Type Medium --> Errors

or edit the index.php

insert
$comma = $lang->comma." ";

above line 139
eval('$onlinemembers[] = "'.$templates->get('index_whosonline_memberbit', 1, 0).'";');
 
Reply
#3
You can remove {$comma} from index_whosonline_memberbit template in BootBB theme.

I will update it in the next release of the theme.
Reply
#4
(2024-08-09, 02:07 AM)panayot Wrote: You can remove {$comma} from index_whosonline_memberbit template in BootBB theme.

I deleted  {$comma} , fixed! thank you!

For {$pollbox} in 'newthread' template, I've tried to delete it and it seems to work, not sure it's a good idea, but no more error for now.

(2024-07-07, 04:59 PM)bv64 Wrote: I know this warning with BootBB
Thanks for your answer bv64! I've just seen your post. 
For now removing ' {$comma}  ' seems to be ok.
Reply
#5
(2024-08-17, 08:58 AM)Mordicus Wrote: For {$pollbox} in 'newthread' template, I've tried to delete it and it seems to work, not sure it's a good idea, but no more error for now.
no! no good idea Wink
 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)