Title: PHP errors
Last modified: August 22, 2016

---

# PHP errors

 *  Resolved [dimitrov.adrian](https://wordpress.org/support/users/dimitrovadrian/)
 * (@dimitrovadrian)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/php-errors-39/)
 * Get a lot of errors in 1.9.2 with wp4.1
 *     ```
       PHP Notice:  Undefined variable: base64data in ...wp-content/plugins/autoptimize/classes/autoptimizeStyles.php on line 311
       PHP Notice:  Undefined property: autoptimizeStyles::$already_minified in ...wp-content/plugins/autoptimize/classes/autoptimizeStyles.php on line 329
       ```
   
 * [https://wordpress.org/plugins/autoptimize/](https://wordpress.org/plugins/autoptimize/)

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

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/php-errors-39/#post-5631370)
 * darn those notices! 🙂
 * the 2nd one is a type, can you on line 391 change
 *     ```
       if (($this->already_minified!==true) && (apply_filters("autoptimize_css_do_minify", true))) {
       ```
   
 * into
 *     ```
       if (($this->alreadyminified!==true) && (apply_filters("autoptimize_css_do_minify", true))) {
       ```
   
 * the first one is slightly more difficult, I’ll look into that one of the following
   days.
 * thanks for reporting!
    frank
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/php-errors-39/#post-5631469)
 * OK, for the base64data notice, on line 270 replace;
 *     ```
       if($icheck->check()) {
            // we have the base64 image in cache
            $headAndData=$icheck->retrieve();
       } else {
       ```
   
 * with
 *     ```
       if($icheck->check()) {
            // we have the base64 image in cache
            $headAndData=$icheck->retrieve();
            $_base64data=explode(";base64,",$headAndData);
            $base64data=$_base64data[1];
       } else {
       ```
   
 * Could you confirm if these two fixes make the notices go away? I’ll make sure
   both go in the next AO-version.
 * Have a nice Sunday,
    frank
 *  Thread Starter [dimitrov.adrian](https://wordpress.org/support/users/dimitrovadrian/)
 * (@dimitrovadrian)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/php-errors-39/#post-5631485)
 * Thanks for the support. Patches seems to work fine, or at least i have no warnings
   last few hours.
 * About the second patch, are you sure that there will be no case that ‘;base64,’
   will be not in the $icheck->retrieve();
 * because then $_base64data[1] could be undefined.
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/php-errors-39/#post-5631487)
 * > About the second patch, are you sure that there will be no case that ‘;base64,’
   > will be not in the $icheck->retrieve();
 * yep; a couple of lines later (if $icheck->check is false), you can see $dataurihead(
   which is the first part of $headAndData) being set in a switch-case block and
   each of the values there, including the default one, ends with “;base64,”.
 * frank

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

The topic ‘PHP errors’ 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/php-errors-39/#post-5631487)
 * Status: resolved