Skip to content

Commit

Permalink
* 2.22.2 see README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecc-business-account committed Feb 1, 2022
1 parent 39b9cda commit e9b3cb1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1973,6 +1973,8 @@ In a nutshell:
* Every minor version means that it adds a new functionality i.e. 1.5 -> 1.6 (new methods)
* Every decimal version means that it patches/fixes/refactoring a previous functionality i.e. 1.5.0 -> 1.5.1 (fix)

* 2.22.2 2022-02-01
* [PdoOneQuery] [fix] when the argument of a method is empty or zero. Now, it throws an exception.
* 2.22.1 2022-01-03
* [core] [edit] generateAllClasses() now returns errors and warnings.
* 2.22 2022-01-30
Expand Down
8 changes: 8 additions & 0 deletions lib/PdoOneQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ public function runGen(
try {
/** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
foreach ($allparam as &$param) {
if($param[0]===0) {
// it is used because when $param[0]===0, it throws an uncatchable exception.
throw new RuntimeException('incorrect param');
}
$reval = $reval && $stmt->bindParam(...$param); // unpack
}
if ($this->parent->partition !== null) {
Expand All @@ -220,6 +224,10 @@ public function runGen(
} else {
$partitionParam = $this->parent->partition;
}
if($partitionParam[0]===0) {
// it is used because when $partitionParam[0]===0, it throws an uncatchable exception.
throw new RuntimeException('incorrect param');
}
$reval = $reval && $stmt->bindParam(...$partitionParam);
}
} catch (Exception $ex) {
Expand Down

0 comments on commit e9b3cb1

Please sign in to comment.