I kept getting the following errors when running drupal with fasttoggle (latest dev) using PHP7
Notice: Undefined property: stdClass::$Array in fasttoggle() (line 186 of /var/www/html/bcmain/armoire/sites/all/modules/fasttoggle/fasttoggle.module).
Notice: Array to string conversion in fasttoggle() (line 187 of /var/www/html/bcmain/armoire/sites/all/modules/fasttoggle/fasttoggle.module).
Notice: Undefined property: stdClass::$Array in fasttoggle() (line 187 of /var/www/html/bcmain/armoire/sites/all/modules/fasttoggle/fasttoggle.module).
Notice: Array to string conversion in fasttoggle_get_allowed_links() (line 392 of /var/www/html/bcmain/armoire/sites/all/modules/fasttoggle/fasttoggle.module).
Notice: Undefined property: stdClass::$Array in fasttoggle_get_allowed_links() (line 392 of /var/www/html/bcmain/armoire/sites/all/modules/fasttoggle/fasttoggle.module).
While the code was throwing notices, it was causing fasttoggle links for publish/unpublish/sicky/unsticky/etc to show on blogs/forums/and other nodes.
I did some research that led me to a patch generated for ctools to fix similar issues ( https://www.drupal.org/node/2640404 ) and have created the attached patch to make fasttoggle run in PHP7 without any errors. I've only done a basic patch, nothing to do with coding standards and styles.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | undefined_property-2721255-4.patch | 2.14 KB | brentg |
Comments
Comment #2
nigelcunningham commentedPatch applied; thanks.
Comment #3
Jorrit commentedCould you create a new release with this change?
Comment #4
brentgAdded a new patch that applies on the most recent version of fasttoggle