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

phpBB 3.3.4 Errors #149

Open
Brandin opened this issue May 23, 2021 · 1 comment
Open

phpBB 3.3.4 Errors #149

Brandin opened this issue May 23, 2021 · 1 comment

Comments

@Brandin
Copy link

Brandin commented May 23, 2021

Expected Behavior

Plugin causes no errors on forum.

Actual Behavior

Error produced by plugin, plugin does not work:

[23-May-2021 17:58:26 UTC] PHP Fatal error:  Uncaught TypeError: mysqli_data_seek(): Argument #2 ($offset) must be of type int, mysqli_result given in /home/thelight/public_html/phpbb/db/driver/mysqli.php:281
Stack trace:
#0 /home/thelight/public_html/phpbb/db/driver/mysqli.php(281): mysqli_data_seek(Object(mysqli_result), Object(mysqli_result))
#1 /home/thelight/public_html/phpbb/db/driver/driver.php(381): phpbb\db\driver\mysqli->sql_rowseek(Object(mysqli_result), Object(mysqli_result))
#2 /home/thelight/public_html/phpbb/db/driver/factory.php(297): phpbb\db\driver\driver->sql_fetchfield('topic_count', Object(mysqli_result), Object(mysqli_result))
#3 /home/thelight/public_html/ext/paybas/recenttopics/core/recenttopics.php(311): phpbb\db\driver\factory->sql_fetchfield('topic_count', Object(mysqli_result))
#4 /home/thelight/public_html/ext/paybas/recenttopics/event/listener.php(71): paybas\recenttopics\core\recenttopics->display_recent_topics()
#5 /home/thelight/public_html/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/thelight/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'core.index_modi...', Object(phpbb\event\data))
#7 /home/thelight/public_html/phpbb/event/dispatcher.php(62): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('core.index_modi...', Object(phpbb\event\data))
#8 /home/thelight/public_html/phpbb/event/dispatcher.php(46): phpbb\event\dispatcher->dispatch('core.index_modi...', Object(phpbb\event\data))
#9 /home/thelight/public_html/index.php(244): phpbb\event\dispatcher->trigger_event('core.index_modi...', Array)
#10 {main}
  thrown in /home/thelight/public_html/phpbb/db/driver/mysqli.php on line 281

Steps to Reproduce the Problem

  1. Load extension version 2.2.15 onto phpBB 3.3.4
  2. Attempt to load the forum and the errors will be produced

Specifications

  • phpbb version: 3.3.4
  • recenttopics version: 2.2.15
@david63
Copy link

david63 commented Jan 7, 2022

This error is caused by this line of code

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

in core/recenttopics.php on line 311

It should be

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

and is probably a PHP8 issue

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