[phpBB Debug] PHP Warning in Recent Topics

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
SEKIZO
Registered User
Posts: 31
Joined: Fri Aug 23, 2024 6:19 pm

[phpBB Debug] PHP Warning in Recent Topics

Post by SEKIZO »

im getting this error when im trying to delete data or recent topics extension

[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/migrator.php on line 662: Undefined array key 17

i checked line but i dont see anything wrong , what should i do
Last edited by Mick on Wed Sep 18, 2024 6:57 am, edited 1 time in total.
Reason: Added more descriptive title.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26828
Joined: Fri Aug 29, 2008 9:49 am

Re: Quick help please

Post by Mick »

Have you or your host recently updated the PHP version? It seems ‘Recent Topics’ doesn’t play nicely with PHP 8+.

You should ask the question in the dedicated discussion/support forum for the extension here?

Note: You can title your post as you wish, but experience tells us you are more likely to get quicker help if the title is descriptive of your issue. "Hey!", "Need help", "phpBB issue!", "Urgent Help Needed", "Bug", etc, will be less conducive to a fast solution or quick attention.
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
User avatar
Helter Skelter
Registered User
Posts: 162
Joined: Tue Jan 25, 2005 8:22 am
Location: integramod.com

Re: [phpBB Debug] PHP Warning in Recent Topics

Post by Helter Skelter »

Before trying this fix, please BACKUP your existing file!
assuming this is your line

Code: Select all

			$result = $this->run_step($steps[$step], $last_result, $revert);
FIND

Code: Select all

			$result = $this->run_step($steps[$step], $last_result, $revert);
			if (($result !== null && $result !== true) || $step + 1 < count($steps))
			{
				return array(
					'result'	=> $result,
					// Move on if the last call finished
					'step'		=> ($result !== null && $result !== true) ? $step : $step + 1,
				);
			}
REPLACE WITH THIS

Code: Select all

			if (array_key_exists($step, $steps)) 
			{
				$result = $this->run_step($steps[$step], $last_result, $revert);
				if (($result !== null && $result !== true) || $step + 1 < count($steps)) {
					return array(
						'result' => $result,
						// Move on if the last call finished
						'step' => ($result !== null && $result !== true) ? $step : $step + 1,
					);
				}
			} 
			else 
			{
				return array(
					'result' => null,
					'step' => $step,
				);
			}
Note Most of the devs here will probably disagree with this fix since it alters core code and could possibly cause trouble with future phpBB updates so as Mick suggested, check the extension topic for a fix first

Return to “[3.3.x] Support Forum”