Skip to content

Commit c6b2a1d

Browse files
dgnorbe
authored andcommitted
ActiveRow::_get() does not return a reference
1 parent 598f43f commit c6b2a1d

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/Database/Helpers.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ public static function dumpSql(SqlLiteral $query, ?Explorer $explorer = null): s
143143
. '>&lt;' . htmlspecialchars($type, ENT_NOQUOTES, 'UTF-8') . ' resource&gt;</i> ';
144144

145145
} elseif (is_bool($param)) {
146+
if($explorer && $explorer->getConnection()->getDriver() instanceof Drivers\PgSqlDriver) {
147+
return $param ? 'true' : 'false';
148+
}
146149
return (string) (int) $param;
147150

148151
} else {

src/Database/Table/ActiveRow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public function __set(string $column, mixed $value): void
232232
* @return ActiveRow|mixed
233233
* @throws Nette\MemberAccessException
234234
*/
235-
public function &__get(string $key): mixed
235+
public function __get(string $key): mixed
236236
{
237237
if ($this->accessColumn($key)) {
238238
return $this->data[$key];

0 commit comments

Comments
 (0)