Skip to content

Commit

Permalink
Fixes #18 (#29)
Browse files Browse the repository at this point in the history
Fixes #18 in that if a param doesn't match then return empty array
  • Loading branch information
tm1000 authored and jimbojsb committed Jul 13, 2018
1 parent 9d31d40 commit f6de3bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Pseudo/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ public function getRows(array $params = [])
if ($this->params !== null && empty($params)) $params = $this->params;
if ($params) {
if ($this->isParameterized) {
return $this->rows[$this->stringifyParameterSet($params)];
if(isset($this->rows[$this->stringifyParameterSet($params)])) {
return $this->rows[$this->stringifyParameterSet($params)];
} else {
return [];
}
}
throw new Exception("Cannot get rows with parameters on a non-parameterized result");
} else {
Expand Down

0 comments on commit f6de3bd

Please sign in to comment.