Title: PHP Notice
Last modified: August 30, 2016

---

# PHP Notice

 *  Resolved [BBIndikator](https://wordpress.org/support/users/bbindikator/)
 * (@bbindikator)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/php-notice-54/)
 * Hello Frank,
 * I’m not sure why it happens. Our PHP-Error.log was full with this message:
 * [30-Jun-2015 10:15:37 UTC] PHP Notice: Undefined property: autoptimizeStyles::
   $dontmove in path/to/plugins/autoptimize/classes/autoptimizeStyles.php on line
   546
 * Fix is pretty simple, but is there a special reason why this property is undefined?
 *     ```
       private function ismovable($tag) {
       		if(isset($this->dontmove)){
       			if (is_array($this->dontmove)) {
       				foreach($this->dontmove as $match) {
       					if(strpos($tag,$match)!==false) {
       						//Matched something
       						return false;
       					}
       				}
       			}
       		}
       		//If we're here it's safe to move
       		return true;
       	}
       ```
   
 * Thank you and best regards,
    Bruno
 * [https://wordpress.org/plugins/autoptimize/](https://wordpress.org/plugins/autoptimize/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/php-notice-54/#post-6282685)
 * good catch. problem appears when you don’t exclude anything from CSS optimization(
   which is not the case by default) and is due to this block [that starts on line 33](https://github.com/futtta/autoptimize/blob/master/classes/autoptimizeStyles.php#L33);
 *     ```
       if ($excludeCSS!=="") {
       	$this->dontmove = array_filter(array_map('trim',explode(",",$excludeCSS)));
       }
       ```
   
 * if you change that into;
 *     ```
       if ($excludeCSS!=="") {
       	$this->dontmove = array_filter(array_map('trim',explode(",",$excludeCSS)));
       } else {
       	$this->dontmove = "";
       }
       ```
   
 * all should be fine?
 * frank
 *  Thread Starter [BBIndikator](https://wordpress.org/support/users/bbindikator/)
 * (@bbindikator)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/php-notice-54/#post-6282701)
 * Yes, that’s a better way to fix it… Everything is fine now..
 * I reordered some of our css-styles and js-files to work properly with AO. That
   means that in our case (more than 100 active modules together with Plugin Organizer)
   no exclusions are needed..
 * We have to do some tests for special cases, but you’ve done a really amazing 
   work with AO.. Thanks a lot for it !
 * The only thing that is really hard stuff is the theme “above the fold”, cause
   it’s various on our website from page to page.. I think it makes more sense in
   this case to work with a server-side solution.. We tried googles mod_pagespeed,
   but it seems to work not very well (PageSpeed Insights itself do not recognize
   that it is turned on and on GTMetrix and Pingdoms you will be downgraded and 
   pageload itself rises up)
 * We will see : )
 * Thank you and best regards,
    Bruno
 *  Thread Starter [BBIndikator](https://wordpress.org/support/users/bbindikator/)
 * (@bbindikator)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/php-notice-54/#post-6282704)
 * P.S. we build up a plattform to help other peoples to reach their personal goals..
   In order to your donation rules I hope it’s ok for you to donate to a project
   in africa from a friend of us..
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/php-notice-54/#post-6282706)
 * ok, checked in on GitHub; [https://github.com/futtta/autoptimize/commit/332e7194d4e7d098d5541dac48bd88cb992e2bb2](https://github.com/futtta/autoptimize/commit/332e7194d4e7d098d5541dac48bd88cb992e2bb2)
 * > The only thing that is really hard stuff is the theme “above the fold”, cause
   > it’s various on our website from page to page.
 * you can actually use the API (“autoptimize_filter_css_defer_inline”-filter) to
   override the inline CSS on a per-URL basis (although ideally you wouldn’t have
   different above the fold CSS for each page).
 * does your CSS really vary from page to page, or do you have a number of “pagetypes”
   for which the above-the-fold would be the same (e.g. “typical” blog post, standard
   page, homepage, …)?
 * frank
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/php-notice-54/#post-6282708)
 * > P.S. we build up a plattform to help other peoples to reach their personal 
   > goals.. In order to your donation rules I hope it’s ok for you to donate to
   > a project in africa from a friend of us..
 * absolutely 🙂
 *  Thread Starter [BBIndikator](https://wordpress.org/support/users/bbindikator/)
 * (@bbindikator)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/php-notice-54/#post-6282723)
 * > does your CSS really vary from page to page, or do you have a number of “pagetypes”
   > for which the above-the-fold would be the same (e.g. “typical” blog post, standard
   > page, homepage, …)?
 * To find this out is the goal : ) We start on various pages with another pagelayout
   and with different elements at the beginning. And a lot of this “above the fold”
   elements are heavy customized in special areas inside our custom_stylesheet. 
   And we also work a lot with media-queries..
 * You’re definitely right. On pagetypes like posts the above-the-fold css will 
   not vary.. But here we need also to include our media-queries..?
 * > although ideally you wouldn’t have different above the fold CSS for each page)
 * Yes, you’re definitely right with this. I never recognized this above-the-fold
   theme till yesterday (we use PO, Caching, AO : ), and a lot of optimization on
   the server (VPS) itself). During reading your faq I realized that it really makes
   sense to work with it, but I think this means a lot of refacturing our code especially
   with our responsive design..
 * > you can actually use the API (“autoptimize_filter_css_defer_inline”-filter)
   > to override the inline CSS on a per-URL basis
 * Thanks you for this tip! I will definitely take care of it. But I think here 
   we also have to find out a way to include our media queries 🙂
 * Bruno

Viewing 6 replies - 1 through 6 (of 6 total)

 The topic ‘PHP Notice’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [BBIndikator](https://wordpress.org/support/users/bbindikator/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/php-notice-54/#post-6282723)
 * Status: resolved