pass by reference bug...

This commit is contained in:
Lewis Cowles 2015-06-30 22:54:09 +01:00
parent 0c247dfafb
commit 44e8b43f95

View File

@ -273,7 +273,7 @@ class XLSX extends AbstractReader
{ {
// shared strings are formatted this way: // shared strings are formatted this way:
// <c r="A1" t="s"><v>[SHARED_STRING_INDEX]</v></c> // <c r="A1" t="s"><v>[SHARED_STRING_INDEX]</v></c>
$sharedStringIndex = intval($this->getVNodeValue(&$node)); $sharedStringIndex = intval($this->getVNodeValue($node));
$escapedCellValue = $this->sharedStringsHelper->getStringAtIndex($sharedStringIndex); $escapedCellValue = $this->sharedStringsHelper->getStringAtIndex($sharedStringIndex);
$cellValue = $escaper->unescape($escapedCellValue); $cellValue = $escaper->unescape($escapedCellValue);
return $cellValue; return $cellValue;
@ -288,7 +288,7 @@ class XLSX extends AbstractReader
*/ */
protected function formatStrCellValue(&$node, &$escaper) protected function formatStrCellValue(&$node, &$escaper)
{ {
$escapedCellValue = trim($this->getVNodeValue(&$node)); $escapedCellValue = trim($this->getVNodeValue($node));
$cellValue = $escaper->unescape($escapedCellValue); $cellValue = $escaper->unescape($escapedCellValue);
return $cellValue; return $cellValue;
} }
@ -302,7 +302,7 @@ class XLSX extends AbstractReader
*/ */
protected function formatNumericCellValue(&$node) protected function formatNumericCellValue(&$node)
{ {
$nodeValue = $this->getVNodeValue(&$node); $nodeValue = $this->getVNodeValue($node);
$cellValue = is_int($nodeValue) ? intval($nodeValue) : floatval($nodeValue); $cellValue = is_int($nodeValue) ? intval($nodeValue) : floatval($nodeValue);
return $cellValue; return $cellValue;
} }
@ -316,7 +316,7 @@ class XLSX extends AbstractReader
protected function formatBooleanCellValue(&$node) protected function formatBooleanCellValue(&$node)
{ {
// !! is similar to boolval() // !! is similar to boolval()
$cellValue = (!!$this->getVNodeValue(&$node)); $cellValue = (!!$this->getVNodeValue($node));
return $cellValue; return $cellValue;
} }
@ -331,7 +331,7 @@ class XLSX extends AbstractReader
{ {
// Mitigate thrown Exception on invalid date-time format (http://php.net/manual/en/datetime.construct.php) // Mitigate thrown Exception on invalid date-time format (http://php.net/manual/en/datetime.construct.php)
try { try {
$cellValue = new \DateTime($this->getVNodeValue(&$node)); $cellValue = new \DateTime($this->getVNodeValue($node));
return $cellValue; return $cellValue;
} catch ( \Exception $e ) { } catch ( \Exception $e ) {
// Maybe do something... Not famiiar enough to see about exceptions at this stage // Maybe do something... Not famiiar enough to see about exceptions at this stage