Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: enabled option "show all pages" not compatible with php8 - board crashes #148

Open
bug-i opened this issue May 2, 2021 · 1 comment

Comments

@bug-i
Copy link

bug-i commented May 2, 2021

Also as described here: https://www.phpbb.com/customise/db/extension/recent_topics_2/support/topic/230081

recent topics doesnt work with php8 when you have enabled "show all pages", everything ist fine when you disable this option, or switch back from php8 to php74

tested and reproduced with recent topic 2.2.15 and phpbb 3.3.3, as well as 3.3.4

Errors from the error log:

[10-Apr-2021 23:24:15 Europe/Berlin] PHP Fatal error: Uncaught TypeError: mysqli_data_seek(): Argument #2 ($offset) must be of type int, mysqli_result given in /home/webn73d9c/html/phpBB/phpbb/db/driver/mysqli.php:281
Stack trace:
[code]#0 /home/webn73d9c/html/phpBB/phpbb/db/driver/mysqli.php(281): mysqli_data_seek(Object(mysqli_result), Object(mysqli_result))
#1 /home/webn73d9c/html/phpBB/phpbb/db/driver/driver.php(381): phpbb\db\driver\mysqli->sql_rowseek(Object(mysqli_result), Object(mysqli_result))
#2 /home/webn73d9c/html/phpBB/phpbb/db/driver/factory.php(297): phpbb\db\driver\driver->sql_fetchfield('topic_count', Object(mysqli_result), Object(mysqli_result))
#3 /home/webn73d9c/html/phpBB/ext/paybas/recenttopics/core/recenttopics.php(311): phpbb\db\driver\factory->sql_fetchfield('topic_count', Object(mysqli_result))
#4 /home/webn73d9c/html/phpBB/ext/paybas/recenttopics/event/listener.php(71): paybas\recenttopics\core\recenttopics->display_recent_topics()
#5 /home/webn73d9c/html/phpBB/vendor/symfony/event-dispatcher/EventDispatcher.php(214): paybas\recenttopics\event\listener->display_rt(Object(phpbb\event\data), 'core.index_modi...', Object(phpbb\event\dispatcher))
#6 /home/webn73d9c/html/phpBB/vendor/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'core.index_modi...', Object(phpbb\event\data))
#7 /home/webn73d9c/html/phpBB/phpbb/event/dispatcher.php(62): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('core.index_modi...', Object(phpbb\event\data))
#8 /home/webn73d9c/html/phpBB/phpbb/event/dispatcher.php(46): phpbb\event\dispatcher->dispatch('core.index_modi...', Object(phpbb\event\data))
#9 /home/webn73d9c/html/phpBB/index.php(244): phpbb\event\dispatcher->trigger_event('core.index_modi...', Array)
#10 {main}[/code]
thrown in /home/webn73d9c/html/phpBB/phpbb/db/driver/mysqli.php on line 281

2021-05-02 14_01_35-Aktuelle Themen

@bug-i bug-i changed the title enabled option "show all pages" not compatible with php8 - board crashes bug: enabled option "show all pages" not compatible with php8 - board crashes May 2, 2021
@IMC-GER
Copy link

IMC-GER commented Nov 6, 2022

I fixed the bug.
I change in the /paybas/recenttopics/core/recenttopics.php the line 311 from

$this->total_topics_limit = (int) $this->db->sql_fetchfield('topic_count', $result);
to
$this->total_topics_limit = (int) $this->db->sql_fetchfield('topic_count');

Tested with phpBB 3.3.3, 3.3.9-RC and php 8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants