Trying to access array offset on value of type bool in

Hello. Comrades please help to repaire. Thanks in advance!

Notice : Trying to access array offset on value of type bool in /home/v/v96116tj/public_html/vqmod/vqcache/vq2-system_library_response.php on line 122

 //Q: Add width/height tags to all images for Google Page Speed tip:
//http://code.google.com/speed/page-speed/docs/rendering.html#SpecifyImageDimensions
           preg_match_all('/<img[^>]+>/i', $this->output, $result);
           $img = array();
           foreach($result[0] as $img_tag) {
               preg_match_all('/(width|height|src)=("[^"]*")/i',$img_tag, $img[$img_tag]);
           }
           foreach ($img as $k => $info) {
               if (count($info) == 3 && isset($info[1][0]) && $info[1][0] == 'src') {
               //if (curl_init(str_replace('"', '', $info[2][0]))) {
               $imgfile = str_replace('"', '', $info[2][0]);
               $imgfile = str_replace(HTTP_SERVER, DIR_IMAGE . '../', $imgfile);
               $imgfile = str_replace(HTTPS_SERVER, DIR_IMAGE . '../', $imgfile);
                   if (file_exists($imgfile)) {
                       $image_info = getImageSize(str_replace('"', '', $imgfile));
                       $k = trim($k, '/>');
                       $k = trim($k, '>');
122                 $this->output = str_replace($k, ($k . ' ' . $image_info[3]), $this->output);
                   }
               }
           }

Why parens in that line? Makes no sense at all. You want to replace $k with a non-string? try this instead:

                 $this->output = str_replace($k, $k . ' ' . $image_info[3], $this->output);

Not sure if that is the issue, but, it most likely is…

Sponsor our Newsletter | Privacy Policy | Terms of Service