dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b393b81
)
Don't explode in dump text prefetch when we fall off the end of the file :D
author
Brion Vibber
<brion@users.mediawiki.org>
Sun, 16 Oct 2005 23:53:29 +0000
(23:53 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Sun, 16 Oct 2005 23:53:29 +0000
(23:53 +0000)
maintenance/backupPrefetch.inc
patch
|
blob
|
history
diff --git
a/maintenance/backupPrefetch.inc
b/maintenance/backupPrefetch.inc
index
ddb0656
..
759220d
100644
(file)
--- a/
maintenance/backupPrefetch.inc
+++ b/
maintenance/backupPrefetch.inc
@@
-92,6
+92,9
@@
class BaseDump {
* @access private
*/
function skipTo( $name ) {
+ if( $this->atEnd ) {
+ return false;
+ }
while( $this->reader->read() ) {
if( $this->reader->nodeType == XMLREADER_ELEMENT &&
$this->reader->name == $name ) {
@@
-109,6
+112,9
@@
class BaseDump {
* @access private
*/
function nodeContents() {
+ if( $this->atEnd ) {
+ return false;
+ }
if( $this->reader->isEmptyElement ) {
return "";
}
@@
-132,7
+138,6
@@
class BaseDump {
*/
function close() {
$this->reader->close();
- $this->reader = null;
$this->atEnd = true;
return false;
}