Skip to content

Commit f6de3bd

Browse files
tm1000jimbojsb
authored andcommitted
Fixes #18 (#29)
Fixes #18 in that if a param doesn't match then return empty array
1 parent 9d31d40 commit f6de3bd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Pseudo/Result.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ public function getRows(array $params = [])
4747
if ($this->params !== null && empty($params)) $params = $this->params;
4848
if ($params) {
4949
if ($this->isParameterized) {
50-
return $this->rows[$this->stringifyParameterSet($params)];
50+
if(isset($this->rows[$this->stringifyParameterSet($params)])) {
51+
return $this->rows[$this->stringifyParameterSet($params)];
52+
} else {
53+
return [];
54+
}
5155
}
5256
throw new Exception("Cannot get rows with parameters on a non-parameterized result");
5357
} else {

0 commit comments

Comments
 (0)