Warnings when viewing the page of pages with newly created page

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:

Warnings when viewing the page of pages with newly created page

Post by Mandi »

Viewing the page that contains the pages, with newly created page (no page image, no page cover) these warning showed up

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/controller/pages.php on line 228: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/controller/pages.php on line 261: 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: Warnings when viewing the page of pages with newly created page

Post by Mandi »

To fix these warnings go to /ext/pgreca/pgsocial/controller and open the file pages.php

Locate line 228 which looks like this:

Code: Select all

if ($page['page_avatar'] != '')
Replace with this:

Code: Select all

if ($pages['page_avatar'] != '')
Locate line 261 which looks like this:

Code: Select all

'PAGE_REGDATE'			=> $page['page_regdate'],
Replace with this:

Code: Select all

'PAGE_REGDATE'			=> $pages['page_regdate'],
User avatar
Mandi
Site Admin
Site Admin
Posts: 47
Joined: July 31st, 2023, 8:37 pm
Location: Somewhere, Canada
Contact:

Re: Warnings when viewing the page of pages with newly created page

Post by Mandi »

Ignore this fix. It created another issue of the pages list of pages. The Page avatar image and cover is not showing up. Further investigation needed on this.
Post Reply