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
17913f58
Commit
17913f58
authored
Aug 24, 2007
by
jackbravo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clearer fix for nesting level too deep bug, use in_array with strict flag (use === instead of ==)
parent
666e2f3f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
Connection.php
lib/Doctrine/Connection.php
+4
-1
Transaction.php
lib/Doctrine/Transaction.php
+2
-10
No files found.
lib/Doctrine/Connection.php
View file @
17913f58
...
@@ -469,7 +469,10 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
...
@@ -469,7 +469,10 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
return
false
;
return
false
;
}
}
// column names are specified as array keys
// column names are specified as array keys
$cols
=
array_keys
(
$values
);
$cols
=
array
();
foreach
(
$values
as
$key
=>
$value
)
{
$cols
[]
=
$this
->
quoteIdentifier
(
$key
);
}
// build the statement
// build the statement
$query
=
'INSERT INTO '
.
$this
->
quoteIdentifier
(
$table
)
$query
=
'INSERT INTO '
.
$this
->
quoteIdentifier
(
$table
)
...
...
lib/Doctrine/Transaction.php
View file @
17913f58
...
@@ -129,17 +129,9 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
...
@@ -129,17 +129,9 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
*/
*/
public
function
addInvalid
(
Doctrine_Record
$record
)
public
function
addInvalid
(
Doctrine_Record
$record
)
{
{
/**
if
(
in_array
(
$record
,
$this
->
invalid
,
true
))
{
* for some weird reason in_array cannot be used here (php bug ?)
*
* if used it results in fatal error : [ nesting level too deep ]
*/
foreach
(
$this
->
invalid
as
$val
)
{
if
(
$val
===
$record
)
{
return
false
;
return
false
;
}
}
}
$this
->
invalid
[]
=
$record
;
$this
->
invalid
[]
=
$record
;
return
true
;
return
true
;
}
}
...
...
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