Skip to content

Commit 0ff61a4

Browse files
committed
removed support for PHP 7
1 parent 77632eb commit 0ff61a4

2 files changed

Lines changed: 14 additions & 24 deletions

File tree

src/Dibi/DataSource.php

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -216,24 +216,19 @@ public function toDataSource(): self
216216
*/
217217
public function __toString(): string
218218
{
219-
try {
220-
return $this->connection->translate(
221-
"\nSELECT %n",
222-
(empty($this->cols) ? '*' : $this->cols),
223-
"\nFROM %SQL",
224-
$this->sql,
225-
"\n%ex",
226-
$this->conds ? ['WHERE %and', $this->conds] : null,
227-
"\n%ex",
228-
$this->sorting ? ['ORDER BY %by', $this->sorting] : null,
229-
"\n%ofs %lmt",
230-
$this->offset,
231-
$this->limit,
232-
);
233-
} catch (\Throwable $e) {
234-
trigger_error($e->getMessage(), E_USER_ERROR);
235-
return '';
236-
}
219+
return $this->connection->translate(
220+
"\nSELECT %n",
221+
(empty($this->cols) ? '*' : $this->cols),
222+
"\nFROM %SQL",
223+
$this->sql,
224+
"\n%ex",
225+
$this->conds ? ['WHERE %and', $this->conds] : null,
226+
"\n%ex",
227+
$this->sorting ? ['ORDER BY %by', $this->sorting] : null,
228+
"\n%ofs %lmt",
229+
$this->offset,
230+
$this->limit,
231+
);
237232
}
238233

239234

src/Dibi/Fluent.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,7 @@ public function toDataSource(): DataSource
400400
*/
401401
final public function __toString(): string
402402
{
403-
try {
404-
return $this->connection->translate($this->_export());
405-
} catch (\Throwable $e) {
406-
trigger_error($e->getMessage(), E_USER_ERROR);
407-
return '';
408-
}
403+
return $this->connection->translate($this->_export());
409404
}
410405

411406

0 commit comments

Comments
 (0)