From f9b36a377a67ef95889bc00cea3cf40ee08db62d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 28 Jan 2016 14:59:46 +0100 Subject: [PATCH] Use syntax compatible with older PHP versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/Environment_test.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/Environment_test.php b/test/Environment_test.php index c91e553e91..8735ac8e7a 100644 --- a/test/Environment_test.php +++ b/test/Environment_test.php @@ -47,18 +47,20 @@ class Environment_Test extends PHPUnit_Framework_TestCase TESTSUITE_USER, TESTSUITE_PASSWORD ); + $err_info = $pdo->errorInfo(); $this->assertNull( $pdo->errorCode(), - "Error when trying to connect to database: " . $pdo->errorInfo()[2] + "Error when trying to connect to database: " . $err_info[2] ); //$pdo->beginTransaction(); $test = $pdo->exec("SHOW TABLES;"); //$pdo->commit(); + $err_info = $pdo->errorInfo(); $this->assertEquals( 0, $pdo->errorCode(), - 'Error trying to show tables for database: ' . $pdo->errorInfo()[2] + 'Error trying to show tables for database: ' . $err_info[2] ); } catch (Exception $e) {