phpbb 3.3.0 PHP Fatal error (template\context::assign_block_vars())

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
tehohn
Registered User
Posts: 7
Joined: Fri Jan 25, 2013 4:23 pm

Re: phpbb 3.3.0 PHP Fatal error (template\context::assign_block_vars())

Post by tehohn »

Confirmed, it is a core phpBB issue.
This patch resolves the problem:
https://tracker.phpbb.com/browse/PHPBB3 ... de=gallery

You need to edit:
phpbb\ucp\controller\reset_password.php
User avatar
L&R
Registered User
Posts: 41
Joined: Mon Oct 08, 2018 5:47 am

Re: phpbb 3.3.0 PHP Fatal error (template\context::assign_block_vars())

Post by L&R »

What should we edit in reset_password.php?
I have the same error when password complexity criteria don't match or 2 passwords don't match.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22457
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: phpbb 3.3.0 PHP Fatal error (template\context::assign_block_vars())

Post by Mick »

Doesn’t the tracker ticket give you the information you need? If you’re looking to edit core code you need to post in phpBB Custom coding. You can link back to this topic if you wish.

In any case, this topic is marked solved so you should start your own.
"The more connected we get the more alone we become" - Kyle Broflovski©
User avatar
L&R
Registered User
Posts: 41
Joined: Mon Oct 08, 2018 5:47 am

Re: phpbb 3.3.0 PHP Fatal error (template\context::assign_block_vars())

Post by L&R »

Yes now is clear to me.

[lines 426-431]Remove from reset_password.php

Code: Select all

{
					if (!empty($errors))
		{
			$this->template->assign_block_vars_array('PASSWORD_RESET_ERRORS', array_map([$this->language, 'lang'], $errors));
		}

[lines 428 to 428]Add to reset_password.php

Code: Select all

'PASSWORD_RESET_ERRORS'		=> !empty($errors) ? array_map([$this->language, 'lang'], $errors) : '',
All works as it should now

BR
User avatar
3Di
Former Team Member
Posts: 15511
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: phpbb 3.3.0 PHP Fatal error (template\context::assign_block_vars())

Post by 3Di »

Your changes are wrong since you are removing the first extra curly brace.

What needs to be removed is

Code: Select all

		if (!empty($errors))
		{
			$this->template->assign_block_vars_array('PASSWORD_RESET_ERRORS', array_map([$this->language, 'lang'], $errors));
		}
and add

Code: Select all

		'PASSWORD_RESET_ERRORS'		=> !empty($errors) ? array_map([$this->language, 'lang'], $errors) : '',
on a new line, after

Code: Select all

		$this->template->assign_vars([
https://github.com/phpbb/phpbb/pull/5826/files
https://github.com/phpbb/phpbb/pull/5826
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio
User avatar
L&R
Registered User
Posts: 41
Joined: Mon Oct 08, 2018 5:47 am

Re: phpbb 3.3.0 PHP Fatal error (template\context::assign_block_vars())

Post by L&R »

Yep did it this way and as I said all is fine now.
Thanks for the replay anyway.
Post Reply

Return to “[3.3.x] Support Forum”