Title: Conflict with WP PHP function
Last modified: December 6, 2023

---

# Conflict with WP PHP function

 *  Resolved [Jeromin](https://wordpress.org/support/users/jerominrebatet/)
 * (@jerominrebatet)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/conflict-with-wp-php-function/)
 * Hello,
 * I ran into a bug which is caused by the CSS optimizer.
   I’m using that function`
   wp_add_inline_script` in function.php and after lots of test, autoptimize doesn’t
   load the content of that page if that code is present AND if the page has the
   CSS optimizer enabled.
 * I’m using last versions of WordPress (6.4.2) and last of autoptimize (3.1.10)
   with PHP 8.1.16.
 * Hope information is useful to fix.
   No server errors, only deprecation following
   the bug :`PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) 
   of type string is deprecated in /srv/data/web/vhosts/{obfuscated}/htdocs/wp-content/
   plugins/autoptimize/classes/autoptimizeBase.php on line 617 PHP Deprecated: preg_match():
   Passing null to parameter #2 ($subject) of type string is deprecated in /srv/
   data/web/vhosts/{obfuscated}/htdocs/wp-content/plugins/autoptimize/classes/autoptimizeBase.
   php on line 589
 * A previous warning, which doesn’t seem to be related :
   `PHP Warning: Undefined
   array key 1 in /srv/data/web/vhosts/{obfuscated}/htdocs/wp-content/plugins/autoptimize/
   classes/autoptimizeStyles.php on line 538`
 * I remain available if necessary.
   Have a good day !
    -  This topic was modified 2 years, 6 months ago by [Jeromin](https://wordpress.org/support/users/jerominrebatet/).

Viewing 16 replies (of 16 total)

[←](https://wordpress.org/support/topic/conflict-with-wp-php-function/?output_format=md)
[1](https://wordpress.org/support/topic/conflict-with-wp-php-function/?output_format=md)
2

 *  Thread Starter [Jeromin](https://wordpress.org/support/users/jerominrebatet/)
 * (@jerominrebatet)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/conflict-with-wp-php-function/page/2/#post-17279050)
 * Thank you very much.
 * I see what you mean but I can’t as for admins I don’t want to enabled AO.
   If 
   I use that filter my code would be executed only with AO enabled.So for know 
   I will keep CSS disabled for that page only… until I find a better idea.

Viewing 16 replies (of 16 total)

[←](https://wordpress.org/support/topic/conflict-with-wp-php-function/?output_format=md)
[1](https://wordpress.org/support/topic/conflict-with-wp-php-function/?output_format=md)
2

The topic ‘Conflict with WP PHP function’ 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/)

 * 16 replies
 * 2 participants
 * Last reply from: [Jeromin](https://wordpress.org/support/users/jerominrebatet/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/conflict-with-wp-php-function/page/2/#post-17279050)
 * Status: resolved