mirror of
https://github.com/dg/dibi.git
synced 2025-09-03 11:02:35 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9b070bb737 | ||
|
917971992f | ||
|
bc564555f8 | ||
|
3e20a6b8fc | ||
|
c019e7cac2 |
@@ -110,7 +110,7 @@ class Panel implements Tracy\IBarPanel
|
||||
$backup = [$event->connection->onEvent, \dibi::$numOfQueries, \dibi::$totalTime];
|
||||
$event->connection->onEvent = NULL;
|
||||
$cmd = is_string($this->explain) ? $this->explain : ($event->connection->getConfig('driver') === 'oracle' ? 'EXPLAIN PLAN FOR' : 'EXPLAIN');
|
||||
$explain = Helpers::dump($event->connection->nativeQuery("$cmd $event->sql"), TRUE);
|
||||
$explain = Helpers::dump(@$event->connection->nativeQuery("$cmd $event->sql"), TRUE);
|
||||
} catch (Dibi\Exception $e) {
|
||||
}
|
||||
list($event->connection->onEvent, \dibi::$numOfQueries, \dibi::$totalTime) = $backup;
|
||||
|
@@ -58,13 +58,14 @@ class DateTime extends \DateTime
|
||||
|
||||
public function __wakeup()
|
||||
{
|
||||
if (isset($this->fix)) {
|
||||
if (isset($this->fix[1])) {
|
||||
$this->__construct($this->fix[0], new \DateTimeZone($this->fix[1]));
|
||||
} else {
|
||||
$this->__construct($this->fix[0]);
|
||||
}
|
||||
if (isset($this->fix, $this->fix[1])) {
|
||||
$this->__construct($this->fix[0], new \DateTimeZone($this->fix[1]));
|
||||
unset($this->fix);
|
||||
} elseif (isset($this->fix)) {
|
||||
$this->__construct($this->fix[0]);
|
||||
unset($this->fix);
|
||||
} else {
|
||||
parent::__wakeup();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -370,7 +370,7 @@ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
||||
*/
|
||||
public function fetch($assoc)
|
||||
{
|
||||
$result = $assoc ? ibase_fetch_assoc($this->resultSet, IBASE_TEXT) : ibase_fetch_row($this->resultSet, IBASE_TEXT); // intentionally @
|
||||
$result = $assoc ? @ibase_fetch_assoc($this->resultSet, IBASE_TEXT) : @ibase_fetch_row($this->resultSet, IBASE_TEXT); // intentionally @
|
||||
|
||||
if (ibase_errcode()) {
|
||||
if (ibase_errcode() == self::ERROR_EXCEPTION_THROWN) {
|
||||
|
@@ -22,8 +22,8 @@ class dibi
|
||||
|
||||
/** version */
|
||||
const
|
||||
VERSION = '3.0.5',
|
||||
REVISION = 'released on 2016-07-20';
|
||||
VERSION = '3.0.6',
|
||||
REVISION = 'released on 2016-07-31';
|
||||
|
||||
/** sorting order */
|
||||
const
|
||||
|
@@ -139,7 +139,7 @@ test(function () {
|
||||
Assert::same(['col' => 1], $result->test(['col' => TRUE]));
|
||||
Assert::same(['col' => 0], $result->test(['col' => FALSE]));
|
||||
|
||||
Assert::same(['col' => 0], $result->test(['col' => '']));
|
||||
Assert::same(['col' => 0], @$result->test(['col' => ''])); // triggers warning in PHP 7.1
|
||||
Assert::same(['col' => 0], $result->test(['col' => '0']));
|
||||
Assert::same(['col' => 1], $result->test(['col' => '1']));
|
||||
Assert::same(['col' => 10], $result->test(['col' => '10']));
|
||||
|
@@ -522,7 +522,7 @@ Assert::same(
|
||||
|
||||
Assert::same(
|
||||
reformat('INSERT INTO 0'),
|
||||
$conn->translate('INSERT INTO %f', 'ahoj')
|
||||
@$conn->translate('INSERT INTO %f', 'ahoj') // triggers warning in PHP 7.1
|
||||
);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user