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
4af4999b
Unverified
Commit
4af4999b
authored
May 09, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ResultCacheStatement::fetchAllNumeric() should return numeric arrays
parent
e0421d15
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
ResultCacheStatement.php
lib/Doctrine/DBAL/Cache/ResultCacheStatement.php
+10
-13
No files found.
lib/Doctrine/DBAL/Cache/ResultCacheStatement.php
View file @
4af4999b
...
...
@@ -13,6 +13,7 @@ use Doctrine\DBAL\ForwardCompatibility\Driver\ResultStatement as ForwardCompatib
use
InvalidArgumentException
;
use
IteratorAggregate
;
use
PDO
;
use
function
array_map
;
use
function
array_merge
;
use
function
array_values
;
use
function
assert
;
...
...
@@ -55,7 +56,7 @@ class ResultCacheStatement implements IteratorAggregate, ResultStatement, Forwar
*/
private
$emptied
=
false
;
/** @var
mixed[]
*/
/** @var
array<int,array<string,mixed>>
*/
private
$data
;
/** @var int */
...
...
@@ -247,7 +248,9 @@ class ResultCacheStatement implements IteratorAggregate, ResultStatement, Forwar
$data
=
$this
->
statement
->
fetchAll
(
FetchMode
::
ASSOCIATIVE
);
}
return
$this
->
store
(
$data
);
$this
->
store
(
$data
);
return
array_map
(
'array_values'
,
$this
->
data
);
}
/**
...
...
@@ -261,7 +264,9 @@ class ResultCacheStatement implements IteratorAggregate, ResultStatement, Forwar
$data
=
$this
->
statement
->
fetchAll
(
FetchMode
::
ASSOCIATIVE
);
}
return
$this
->
store
(
$data
);
$this
->
store
(
$data
);
return
$this
->
data
;
}
/**
...
...
@@ -311,19 +316,11 @@ class ResultCacheStatement implements IteratorAggregate, ResultStatement, Forwar
}
/**
* @param array<int,array<mixed>> $data
*
* @return array<int,array<mixed>>
* @param array<int,array<string,mixed>> $data
*/
private
function
store
(
array
$data
)
:
array
private
function
store
(
array
$data
)
:
void
{
foreach
(
$data
as
$key
=>
$value
)
{
$data
[
$key
]
=
[
$value
];
}
$this
->
data
=
$data
;
$this
->
emptied
=
true
;
return
$this
->
data
;
}
}
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