Advertisement
pusatdata

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

Oct 2nd, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  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/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement