From 8f74f26fd483d9ef8f56250388df37bf708d0072 Mon Sep 17 00:00:00 2001 From: Bas-Jan 't Jong Date: Wed, 28 May 2014 20:35:24 +0200 Subject: [PATCH] Travis build error fix --- src/PhpWord/Element/Field.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpWord/Element/Field.php b/src/PhpWord/Element/Field.php index 5d6101e2..0bde0387 100644 --- a/src/PhpWord/Element/Field.php +++ b/src/PhpWord/Element/Field.php @@ -128,7 +128,7 @@ class Field extends AbstractElement public function setProperties($properties = array()) { if (is_array($properties)) { - foreach ($properties as $propkey => $propval) { + foreach (array_keys($properties) as $propkey) { if (!(array_key_exists($propkey, $this->fieldsArray[$this->type]['properties']))) { throw new \InvalidArgumentException("Invalid property"); } @@ -157,7 +157,7 @@ class Field extends AbstractElement public function setOptions($options = array()) { if (is_array($options)) { - foreach ($options as $optionkey => $optionval) { + foreach (array_keys($options) as $optionkey) { if (!(array_key_exists($optionkey, $this->fieldsArray[$this->type]['options']))) { throw new \InvalidArgumentException("Invalid option"); }