Title: Invalid argument &#8211; localizejs.class.php
Last modified: August 30, 2016

---

# Invalid argument – localizejs.class.php

 *  [poundnine](https://wordpress.org/support/users/poundnine/)
 * (@poundnine)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/invalid-argument-localizejsclassphp/)
 * Hello,
 * I have been using your plugin for a few months without issue. It works as expected,
   thank you!
 * While cleaning up Apache error logs, I noticed the following PHP warning occurring
   frequently (several times an hour):
 * AH01071: Got error ‘PHP message: PHP Warning: Invalid argument supplied for foreach()
   in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/above-the-fold-optimization/
   includes/localizejs.class.php on line 203\n’
 * I took a look at the code and assume that ‘$this->CTRL->localizejs->modules’ 
   does not exist at times. I am not sure where this function is called from. Can
   you please advise or suggest how to resolve this?
 * /* Parse HTML*/
    public function parse_html( $html ) { foreach ($this->CTRL->
   localizejs->modules as $module) { $html = $module->parse_html( $html ); } return
   $html; }
 * Regards,
    Brad
 * [https://wordpress.org/plugins/above-the-fold-optimization/](https://wordpress.org/plugins/above-the-fold-optimization/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [optimalisatie](https://wordpress.org/support/users/optimalisatie/)
 * (@optimalisatie)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-localizejsclassphp/#post-6634169)
 * Dear Brad,
 * My apologies for the late reply.
 * Thank you for the bug report! The localizeJS feature is a beta-feature. I’ve 
   investigated the issue and found a bug. The bug has been fixed in the next version(
   v2.3.4).

Viewing 1 replies (of 1 total)

The topic ‘Invalid argument – localizejs.class.php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/above-the-fold-optimization_fcfbf6.
   svg)
 * [Page Speed Optimization](https://wordpress.org/plugins/above-the-fold-optimization/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/above-the-fold-optimization/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/above-the-fold-optimization/)
 * [Active Topics](https://wordpress.org/support/plugin/above-the-fold-optimization/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/above-the-fold-optimization/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/above-the-fold-optimization/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [optimalisatie](https://wordpress.org/support/users/optimalisatie/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-localizejsclassphp/#post-6634169)
 * Status: not resolved