From 524c0938957950ea05563a677bc43adc0d8644e3 Mon Sep 17 00:00:00 2001 From: Alexander Pervakov Date: Mon, 14 Jul 2014 14:55:57 +0400 Subject: [PATCH] Fix reader when comment within text:p element --- Classes/PHPExcel/Reader/OOCalc.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Classes/PHPExcel/Reader/OOCalc.php b/Classes/PHPExcel/Reader/OOCalc.php index ce30fc25..4ffed2b3 100644 --- a/Classes/PHPExcel/Reader/OOCalc.php +++ b/Classes/PHPExcel/Reader/OOCalc.php @@ -515,9 +515,13 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce $annotationText = $cellDataOffice->annotation->children($namespacesContent['text']); $textArray = array(); foreach($annotationText as $t) { - foreach($t->span as $text) { - $textArray[] = (string)$text; - } + if (isset($t->span)) { + foreach($t->span as $text) { + $textArray[] = (string)$text; + } + } else { + $textArray[] = (string) $t; + } } $text = implode("\n",$textArray); // echo $text,'
';