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
35093a4b
Unverified
Commit
35093a4b
authored
Aug 15, 2018
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced call_user_func_array() of a fixed method with the usage of variadic arguments
parent
66daecd0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
DB2Statement.php
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
+0
-1
MysqliStatement.php
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
+3
-5
SQLAnywhereStatement.php
...Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php
+1
-2
No files found.
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
View file @
35093a4b
...
...
@@ -27,7 +27,6 @@ use const DB2_CHAR;
use
const
DB2_LONG
;
use
const
DB2_PARAM_IN
;
use
function
array_change_key_case
;
use
function
call_user_func_array
;
use
function
db2_bind_param
;
use
function
db2_execute
;
use
function
db2_fetch_array
;
...
...
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
View file @
35093a4b
...
...
@@ -25,7 +25,6 @@ use Doctrine\DBAL\FetchMode;
use
Doctrine\DBAL\ParameterType
;
use
function
array_combine
;
use
function
array_fill
;
use
function
call_user_func_array
;
use
function
count
;
use
function
str_repeat
;
...
...
@@ -172,7 +171,7 @@ class MysqliStatement implements \IteratorAggregate, Statement
throw
new
MysqliException
(
$this
->
_stmt
->
error
,
$this
->
_stmt
->
errno
);
}
}
else
{
if
(
!
call_user_func_array
([
$this
->
_stmt
,
'bind_param'
],
[
$this
->
types
]
+
$this
->
_bindedValues
))
{
if
(
!
$this
->
_stmt
->
bind_param
(
$this
->
types
,
...
$this
->
_bindedValues
))
{
throw
new
MysqliException
(
$this
->
_stmt
->
error
,
$this
->
_stmt
->
sqlstate
,
$this
->
_stmt
->
errno
);
}
}
...
...
@@ -221,7 +220,7 @@ class MysqliStatement implements \IteratorAggregate, Statement
$refs
[
$key
]
=&
$value
;
}
if
(
!
call_user_func_array
([
$this
->
_stmt
,
'bind_result'
],
$refs
))
{
if
(
!
$this
->
_stmt
->
bind_result
(
...
$refs
))
{
throw
new
MysqliException
(
$this
->
_stmt
->
error
,
$this
->
_stmt
->
sqlstate
,
$this
->
_stmt
->
errno
);
}
}
...
...
@@ -242,13 +241,12 @@ class MysqliStatement implements \IteratorAggregate, Statement
{
$params
=
[];
$types
=
str_repeat
(
's'
,
count
(
$values
));
$params
[
0
]
=
$types
;
foreach
(
$values
as
&
$v
)
{
$params
[]
=&
$v
;
}
return
call_user_func_array
([
$this
->
_stmt
,
'bind_param'
],
$params
);
return
$this
->
_stmt
->
bind_param
(
$types
,
...
$params
);
}
/**
...
...
lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php
View file @
35093a4b
...
...
@@ -26,7 +26,6 @@ use Doctrine\DBAL\ParameterType;
use
IteratorAggregate
;
use
const
SASQL_BOTH
;
use
function
array_key_exists
;
use
function
call_user_func_array
;
use
function
func_get_args
;
use
function
func_num_args
;
use
function
gettype
;
...
...
@@ -280,7 +279,7 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement
switch
(
$fetchMode
)
{
case
FetchMode
::
CUSTOM_OBJECT
:
while
(
$row
=
call_user_func_array
([
$this
,
'fetch'
],
func_get_args
()))
{
while
(
$row
=
$this
->
fetch
(
...
func_get_args
()))
{
$rows
[]
=
$row
;
}
break
;
...
...
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