projects
/
pear
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
79af6b0
)
fix warning
author
Alan
<alan@roojs.com>
Fri, 14 Jan 2022 03:27:15 +0000
(11:27 +0800)
committer
Alan
<alan@roojs.com>
Fri, 14 Jan 2022 03:27:15 +0000
(11:27 +0800)
HTML/FlexyFramework.php
patch
|
blob
|
history
diff --git
a/HTML/FlexyFramework.php
b/HTML/FlexyFramework.php
index
2b5f543
..
1f7dbf6
100755
(executable)
--- a/
HTML/FlexyFramework.php
+++ b/
HTML/FlexyFramework.php
@@
-912,8
+912,9
@@
RewriteRule ^(.+)$ /web.hpasite/index.local.php [L,NC,E=URL:$1]
<BR> ".$err->toString());
}
$res = $err->query("SELECT @@global.read_only as ro");
<BR> ".$err->toString());
}
$res = $err->query("SELECT @@global.read_only as ro");
- $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
- if (!empty($row['ro']) && empty($options['skip-read-only-check'])) {
+
+ $row = is_a($res, 'DB_Error') ? false : $res->fetchRow(DB_FETCHMODE_ASSOC);
+ if (!$row || (!empty($row['ro']) && empty($options['skip-read-only-check']))) {
$this->fatalError("Database is configured to be read-only - please check database<BR> ".$err->toString());
}
// reset dont die!
$this->fatalError("Database is configured to be read-only - please check database<BR> ".$err->toString());
}
// reset dont die!