Title: bug
Last modified: October 27, 2019

---

# bug

 *  [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/)
 * (@brianbrown)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/bug-263/)
 * Hi Jean!
    Php 7+ is throwing a notice:
 * `PHP Notice: Undefined offset: 0 in /path/to/wp-content/plugins/base64-images-
   modified/classes/class-base-64-images.php on line 246`
 * Here:
 *     ```
       //get background-image from style
               $tags = $doc->getElementsByTagName('div');
               foreach ($tags as $tag) {
                   $style = $tag->getAttribute('style');
                   preg_match('/\(([^)]+)\)/', $style, $match);
                   $src = trim($match['0'], "'()\"");// <---['0'] unidefined
                   $content = $this->change_source($src, $content);
       ```
   
 * Just thought that you should know.
    Cheers and thanks! -Brian
    -  This topic was modified 6 years, 7 months ago by [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/).
    -  This topic was modified 6 years, 7 months ago by [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/).

The topic ‘bug’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/base64-images.svg)
 * [Base64 Images](https://wordpress.org/plugins/base64-images/)
 * [Support Threads](https://wordpress.org/support/plugin/base64-images/)
 * [Active Topics](https://wordpress.org/support/plugin/base64-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/base64-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/base64-images/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/bug-263/)
 * Status: not resolved