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.

Comments

REPlummer created an issue. See original summary.

nigelcunningham’s picture

Status: Active » Closed (fixed)

Patch applied; thanks.

Jorrit’s picture

Could you create a new release with this change?

brentg’s picture

StatusFileSize
new2.14 KB

Added a new patch that applies on the most recent version of fasttoggle