(solved) Bool error upon page creation

For documentation of changes to the PGSocial Network extension
Post Reply
User avatar
Mandi
Site Admin
Site Admin
Posts: 47
Joined: July 31st, 2023, 8:37 pm
Location: Somewhere, Canada
Contact:

(solved) Bool error upon page creation

Post by Mandi »

This bool error showed up when creating a page (and page is pending approval)

[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/controller/pages.php on line 194: Trying to access array offset on value of type bool
User avatar
Mandi
Site Admin
Site Admin
Posts: 47
Joined: July 31st, 2023, 8:37 pm
Location: Somewhere, Canada
Contact:

Re: Bool error upon page creation

Post by Mandi »

Locate line 194 which looks like this:

Code: Select all

'GALLERY_NAME'				=> $this->social_photo->gallery_info($this->request->variable('gall', ''))['gallery_name'],
Replace with this:

Code: Select all

'GALLERY_NAME'				=> $this->social_photo->gallery_info($this->request->variable('gall', ''))['gallery_name'] ?? null,
Post Reply