SHARE
TWEET

Warning: Cannot assign an empty string to a string offset in

pustakakoran Oct 2nd, 2019 (edited) 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Warning: Cannot assign an empty string to a string offset in wp-includes/class.wp-scripts.php on line 447
  2.  
  3. The developers just need to add an !empty conditional for $value around line 443… I.e:
  4.  
  5.         foreach ( (array) $l10n as $key => $value ) {
  6.             if ( !is_scalar($value) )
  7.                 continue;
  8.  
  9.             $l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');
  10.         }
  11.  
  12. to...
  13.  
  14.         foreach ( (array) $l10n as $key => $value ) {
  15.             if ( !is_scalar($value) )
  16.                 continue;
  17.  
  18.             if (!empty($value)) {
  19.                 $l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');
  20.             }
  21.         }
  22.  
  23. sumber:
  24. https://wordpress.org/support/topic/warning-cannot-assign-an-empty-string-to-a-string-offset-2/
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top