Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
1faeb780
Unverified
Commit
1faeb780
authored
Jan 12, 2018
by
Marco Pivetta
Committed by
GitHub
Jan 12, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2955 from morozov/issues/2954
[DBAL-2954] Removed error suppression in IBM DB2 Statement
parents
a5326972
9ec35f7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
DB2Statement.php
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
+1
-1
DB2StatementTest.php
.../Tests/DBAL/Functional/Driver/IBMDB2/DB2StatementTest.php
+36
-0
No files found.
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
View file @
1faeb780
...
...
@@ -172,7 +172,7 @@ class DB2Statement implements \IteratorAggregate, Statement
}
}
$retval
=
@
db2_execute
(
$this
->
_stmt
,
$params
);
$retval
=
db2_execute
(
$this
->
_stmt
,
$params
);
if
(
$retval
===
false
)
{
throw
new
DB2Exception
(
db2_stmt_errormsg
());
...
...
tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2StatementTest.php
0 → 100644
View file @
1faeb780
<?php
declare
(
strict_types
=
1
);
namespace
Doctrine\Tests\DBAL\Functional\Driver\IBMDB2
;
use
Doctrine\DBAL\Driver\IBMDB2\DB2Driver
;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
PHPUnit\Framework\Error\Notice
;
class
DB2StatementTest
extends
DbalFunctionalTestCase
{
protected
function
setUp
()
{
if
(
!
extension_loaded
(
'ibm_db2'
))
{
$this
->
markTestSkipped
(
'ibm_db2 is not installed.'
);
}
parent
::
setUp
();
if
(
!
$this
->
_conn
->
getDriver
()
instanceof
DB2Driver
)
{
$this
->
markTestSkipped
(
'ibm_db2 only test.'
);
}
}
public
function
testExecutionErrorsAreNotSuppressed
()
{
$stmt
=
$this
->
_conn
->
prepare
(
'SELECT * FROM SYSIBM.SYSDUMMY1 WHERE \'foo\' = ?'
);
// unwrap the statement to prevent the wrapper from handling the PHPUnit-originated exception
$wrappedStmt
=
$stmt
->
getWrappedStatement
();
$this
->
expectException
(
Notice
::
class
);
$wrappedStmt
->
execute
([[]]);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment