From a90b711edde37e14e6b23676ca1e88b666eb4830 Mon Sep 17 00:00:00 2001 From: Marco Marche Date: Thu, 17 Oct 2013 10:50:14 +0200 Subject: [PATCH] Fixed problem in Excel 2007 reader with headers and footers containing multiple images. All images were substituted with the first one. --- Classes/PHPExcel/Reader/Excel2007.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/PHPExcel/Reader/Excel2007.php b/Classes/PHPExcel/Reader/Excel2007.php index 412cc71..d197eff 100644 --- a/Classes/PHPExcel/Reader/Excel2007.php +++ b/Classes/PHPExcel/Reader/Excel2007.php @@ -1354,10 +1354,10 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE $hfImages = array(); $shapes = $vmlDrawing->xpath('//v:shape'); - foreach ($shapes as $shape) { + foreach ($shapes as $idx => $shape) { $shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); $imageData = $shape->xpath('//v:imagedata'); - $imageData = $imageData[0]; + $imageData = $imageData[$idx]; $imageData = $imageData->attributes('urn:schemas-microsoft-com:office:office'); $style = self::toCSSArray( (string)$shape['style'] );