Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BeastyCoding
ISPConfig 3
Commits
99101991
Commit
99101991
authored
11 years ago
by
Till Brehm
Browse files
Options
Downloads
Patches
Plain Diff
Fixed error handling problem in mysql db library.
parent
6faf141a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/lib/classes/db_mysql.inc.php
+5
-5
5 additions, 5 deletions
server/lib/classes/db_mysql.inc.php
with
5 additions
and
5 deletions
server/lib/classes/db_mysql.inc.php
+
5
−
5
View file @
99101991
...
@@ -101,8 +101,8 @@ class db extends mysqli
...
@@ -101,8 +101,8 @@ class db extends mysqli
}
}
*/
*/
if
(
mysqli_connect_error
())
{
if
(
mysqli_connect_error
())
{
$this
->
errorNumber
=
mysqli_
connect_errno
()
;
$this
->
errorNumber
=
$this
->
connect_errno
;
$this
->
errorMessage
=
mysqli_
connect_error
()
;
$this
->
errorMessage
=
$this
->
connect_error
;
}
else
{
}
else
{
$this
->
errorNumber
=
mysqli_errno
(
$this
);
$this
->
errorNumber
=
mysqli_errno
(
$this
);
$this
->
errorMessage
=
mysqli_error
(
$this
);
$this
->
errorMessage
=
mysqli_error
(
$this
);
...
@@ -137,8 +137,8 @@ class db extends mysqli
...
@@ -137,8 +137,8 @@ class db extends mysqli
$ok
=
$this
->
ping
();
$ok
=
$this
->
ping
();
if
(
!
$ok
)
{
if
(
!
$ok
)
{
if
(
!
$this
->
real_connect
(
$this
->
dbHost
,
$this
->
dbUser
,
$this
->
dbPass
,
$this
->
dbName
))
{
if
(
!
$this
->
real_connect
(
$this
->
dbHost
,
$this
->
dbUser
,
$this
->
dbPass
,
$this
->
dbName
))
{
$this
->
updateError
(
'DB::query -> reconnect'
);
if
(
$try
>
9
)
{
if
(
$try
>
9
)
{
$this
->
updateError
(
'DB::query -> reconnect'
);
return
false
;
return
false
;
}
else
{
}
else
{
sleep
((
$try
>
7
?
5
:
1
));
sleep
((
$try
>
7
?
5
:
1
));
...
@@ -150,7 +150,7 @@ class db extends mysqli
...
@@ -150,7 +150,7 @@ class db extends mysqli
}
}
}
while
(
$ok
==
false
);
}
while
(
$ok
==
false
);
$this
->
queryId
=
parent
::
query
(
$queryString
);
$this
->
queryId
=
parent
::
query
(
$queryString
);
$this
->
updateError
(
'DB::query('
.
$queryString
.
') -> mysqli_query'
);
if
(
!
$this
->
queryId
)
$this
->
updateError
(
'DB::query('
.
$queryString
.
') -> mysqli_query'
);
if
(
!
$this
->
queryId
)
{
if
(
!
$this
->
queryId
)
{
return
false
;
return
false
;
}
}
...
@@ -184,9 +184,9 @@ class db extends mysqli
...
@@ -184,9 +184,9 @@ class db extends mysqli
// returns the next record in an array
// returns the next record in an array
public
function
nextRecord
()
{
public
function
nextRecord
()
{
$this
->
record
=
$this
->
queryId
->
fetch_assoc
();
$this
->
record
=
$this
->
queryId
->
fetch_assoc
();
$this
->
updateError
(
'DB::nextRecord()-> mysql_fetch_array'
);
if
(
!
$this
->
record
||
!
is_array
(
$this
->
record
))
if
(
!
$this
->
record
||
!
is_array
(
$this
->
record
))
{
{
$this
->
updateError
(
'DB::nextRecord()-> mysql_fetch_array'
);
return
false
;
return
false
;
}
}
$this
->
currentRow
++
;
$this
->
currentRow
++
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment