Title: Uninitialized string offset &#8211; CSS/UriRewriter.php
Last modified: December 14, 2016

---

# Uninitialized string offset – CSS/UriRewriter.php

 *  [Gil Araújo](https://wordpress.org/support/users/gilaraujo/)
 * (@gilaraujo)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/uninitialized-string-offset-cssurirewriter-php/)
 * I was able to upgrade WP to 4.7 by disabling W3 Total cache, delegint DB.php 
   then reenabling it.
 * However since i been recieving this error messages in Debug.log
 * PHP Notice: Uninitialized string offset: 0 in ***/wp-content/plugins/w3-total-
   cache/lib/Minify/Minify/CSS/UriRewriter.php on line 379
 * PHP Notice: Uninitialized string offset: 0 in ***/wp-content/plugins/w3-total-
   cache/lib/Minify/Minify/CSS/UriRewriter.php on line 212
 * PHP Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean
   given in ***/wp-includes/wp-db.php on line 3091
 * PHP Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean
   given in ***/wp-includes/wp-db.php on line 3091
 * Does anyone have any idea on how to fix this?
 * Regards

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

 *  [nigro.simone](https://wordpress.org/support/users/nigrosimone/)
 * (@nigrosimone)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/uninitialized-string-offset-cssurirewriter-php/#post-8557420)
 * try this fix [https://github.com/szepeviktor/fix-w3tc/pull/194/files](https://github.com/szepeviktor/fix-w3tc/pull/194/files)
 *  Thread Starter [Gil Araújo](https://wordpress.org/support/users/gilaraujo/)
 * (@gilaraujo)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/uninitialized-string-offset-cssurirewriter-php/#post-8557441)
 * Thank you Nigro! that seems to hav fixed it!
 * Will let it run for a bit and keep an eye on the debug.log and report back
 *  Thread Starter [Gil Araújo](https://wordpress.org/support/users/gilaraujo/)
 * (@gilaraujo)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/uninitialized-string-offset-cssurirewriter-php/#post-8557482)
 * One error went away but still getting this other:
 * [15-Dec-2016 19:05:41 UTC] PHP Notice: Undefined index: scheme in /home/gsadesig/
   public_html/lojadofolclore.pt/wp-content/plugins/w3-total-cache/lib/Minify/Minify/
   CSS/UriRewriter.php on line 415
    [15-Dec-2016 19:05:41 UTC] PHP Notice: Undefined
   index: scheme in /home/gsadesig/public_html/lojadofolclore.pt/wp-content/plugins/
   w3-total-cache/lib/Minify/Minify/CSS/UriRewriter.php on line 415 [15-Dec-2016
   19:05:41 UTC] PHP Notice: Undefined index: scheme in /home/gsadesig/public_html/
   lojadofolclore.pt/wp-content/plugins/w3-total-cache/lib/Minify/Minify/CSS/UriRewriter.
   php on line 415 [15-Dec-2016 19:05:41 UTC] PHP Notice: Undefined index: scheme
   in /home/gsadesig/public_html/lojadofolclore.pt/wp-content/plugins/w3-total-cache/
   lib/Minify/Minify/CSS/UriRewriter.php on line 415 [15-Dec-2016 19:05:41 UTC] 
   PHP Notice: Undefined index: scheme in /home/gsadesig/public_html/lojadofolclore.
   pt/wp-content/plugins/w3-total-cache/lib/Minify/Minify/CSS/UriRewriter.php on
   line 415
 *  Thread Starter [Gil Araújo](https://wordpress.org/support/users/gilaraujo/)
 * (@gilaraujo)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/uninitialized-string-offset-cssurirewriter-php/#post-8557485)
 * Do lines 379 – 381 need doing too. atm they show:
 *  // analyze URI
    if (‘/’ !== $uri[0] // root-relative && false === strpos($uri,‘//’)//
   protocol (non-data) && 0 !== strpos($uri, ‘data:’) // data protocol ) {
 *  [nigro.simone](https://wordpress.org/support/users/nigrosimone/)
 * (@nigrosimone)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/uninitialized-string-offset-cssurirewriter-php/#post-8631450)
 * hi, sorry for the delay, after a deep investigation i have fix the problem. Here
   the details: [https://github.com/szepeviktor/w3-total-cache-fixed/pull/272](https://github.com/szepeviktor/w3-total-cache-fixed/pull/272)

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

The topic ‘Uninitialized string offset – CSS/UriRewriter.php’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [nigro.simone](https://wordpress.org/support/users/nigrosimone/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/uninitialized-string-offset-cssurirewriter-php/#post-8631450)
 * Status: not resolved