MyBB Community Forums
2 warnings in portal.php - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Development (https://community.mybb.com/forum-161.html)
+--- Forum: MyBB 1.8 Development (https://community.mybb.com/forum-165.html)
+---- Forum: 1.8 Bugs and Issues (https://community.mybb.com/forum-157.html)
+---- Thread: 2 warnings in portal.php (/thread-241817.html)



2 warnings in portal.php - bv64 - 2024-09-14

original thread: https://community.mybb.com/thread-241797.html

1)
Quote:<error>
<dateline>1726085583</dateline>
<script>portal.php(762) : eval()'d code</script>
<line>23</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>Undefined variable $multipage</message>
<back_trace>#0 errorHandler->error() called at [/inc/class_error.php:153]
#1 errorHandler->error_callback() called at [/portal.php(762) : eval()'d code:23]
#2 eval() called at [/portal.php:762]
</back_trace>
</error>

occurs when announcements for the portal are disabled

solution: define variable

Change line 444 in portal.php
from
$announcements = '';
to
$announcements = $multipage = '';


2)

Quote:<error>
<dateline>1726294432</dateline>
<script>portal.php</script>
<line>717</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>Undefined variable $tcount</message>
<back_trace>#0 errorHandler->error() called at [/inc/class_error.php:153]
#1 errorHandler->error_callback() called at [/portal.php:717]
</back_trace>
</error>

solution: define variable

put
$tcount = 0;

before line 714
if($attachment['thumbnail'] != "SMALL" && $attachment['thumbnail'] != '')



RE: 2 warnings in portal.php - Eldenroot - 2024-10-07

https://github.com/mybb/mybb/issues/4851