Skip to content

Commit 8f74f26

Browse files
author
Bas-Jan 't Jong
committed
Travis build error fix
1 parent 079d08e commit 8f74f26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpWord/Element/Field.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function getType()
128128
public function setProperties($properties = array())
129129
{
130130
if (is_array($properties)) {
131-
foreach ($properties as $propkey => $propval) {
131+
foreach (array_keys($properties) as $propkey) {
132132
if (!(array_key_exists($propkey, $this->fieldsArray[$this->type]['properties']))) {
133133
throw new \InvalidArgumentException("Invalid property");
134134
}
@@ -157,7 +157,7 @@ public function getProperties()
157157
public function setOptions($options = array())
158158
{
159159
if (is_array($options)) {
160-
foreach ($options as $optionkey => $optionval) {
160+
foreach (array_keys($options) as $optionkey) {
161161
if (!(array_key_exists($optionkey, $this->fieldsArray[$this->type]['options']))) {
162162
throw new \InvalidArgumentException("Invalid option");
163163
}

0 commit comments

Comments
 (0)