Skip to content

Commit bf3353c

Browse files
committed
get rid of PHP warning when custom options are not set
1 parent 48d4f5e commit bf3353c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Diff.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ public function __construct($a, $b, $options=array())
8686
$this->a = $a;
8787
$this->b = $b;
8888

89-
$this->options = array_merge($this->defaultOptions, $options);
89+
if (is_array($options))
90+
$this->options = array_merge($this->defaultOptions, $options);
91+
else
92+
$this->options = $this->defaultOptions;
9093
}
9194

9295
/**

0 commit comments

Comments
 (0)