The previous (development) version of Typogrify did not have this problem. Now whenever I view content that doesn't have a cached filtered version, such as viewing a new node or a just-edited node, I get PHP warnings like this:

* warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/typogrify/typogrify.module on line 100.
* warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/typogrify/typogrify.module on line 108.
* warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/typogrify/typogrify.module on line 100.
* warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/typogrify/typogrify.module on line 108.

Comments

Tim Gambell’s picture

Hi bangpound,

Thanks for the bug report! Sounds like you're having one of the problems described here: http://drupal.org/node/156270. At the end of that thread, there's a possible work-around. I haven't been able to reproduce the problem, so I don't know if the work-around actually works. Give it a try and let me know!

Thanks again.

Tim

Tim Gambell’s picture

Status: Active » Needs review

I've attempted to fix this by making the array that the foreach is traversing into a global, and by double checking that the arrays are indeed what foreach is expecting them to be. Since I can't reproduce the bug, I can't be sure it's squashed. Let me know if this works.

The new code is available in CVS right now; should be available through the project page when the packaging script gets around to it.

Tim Gambell’s picture

Assigned: Unassigned » Tim Gambell
Tim Gambell’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)