From 5569c924498fa8ea42dcae3cdd88f745376117aa Mon Sep 17 00:00:00 2001 From: Shawn Welch Date: Fri, 30 May 2014 16:46:44 -0400 Subject: [PATCH] Invalid Index This happened when I tried to load an Excel doc that was exported by Google Docs. I'm guessing there is no author information or something? I dunno but this fixed worked. --- Classes/PHPExcel/Reader/Excel2007.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Reader/Excel2007.php b/Classes/PHPExcel/Reader/Excel2007.php index 105904c..9ba62ec 100644 --- a/Classes/PHPExcel/Reader/Excel2007.php +++ b/Classes/PHPExcel/Reader/Excel2007.php @@ -1302,7 +1302,8 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE // Loop through contents foreach ($commentsFile->commentList->comment as $comment) { - $docSheet->getComment( (string)$comment['ref'] )->setAuthor( $authors[(string)$comment['authorId']] ); + if(!empty($comment['authorId'])) + $docSheet->getComment( (string)$comment['ref'] )->setAuthor( $authors[(string)$comment['authorId']] ); $docSheet->getComment( (string)$comment['ref'] )->setText( $this->_parseRichText($comment->text) ); } }