Page 1 of 1

Warnings when viewing the page of pages with newly created page

Posted: August 21st, 2023, 7:43 pm
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

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

Posted: August 21st, 2023, 9:15 pm
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'],

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

Posted: August 22nd, 2023, 6:09 pm
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.