r36277 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36276‎ | r36277 | r36278 >
Date:08:57, 14 June 2008
Author:tstarling
Status:old
Tags:
Comment:
Bugs
Modified paths:
  • /trunk/extensions/ExtensionDistributor/svn-invoker.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ExtensionDistributor/svn-invoker.php
@@ -25,6 +25,7 @@
2626 passthru( $cmd, $retval );
2727 $output = ob_get_contents();
2828 ob_end_clean();
 29+ return $output;
2930 }
3031
3132 function svnError( $msg, $info = false ) {
@@ -84,8 +85,12 @@
8586 return;
8687 }
8788
88 - $sx = new SimpleXMLElement( $result );
89 - $rev = $sx->entry->commit['revision'];
 89+ try {
 90+ $sx = new SimpleXMLElement( $result );
 91+ $rev = $sx->entry->commit['revision'];
 92+ } catch ( Exception $e ) {
 93+ $rev = false;
 94+ }
9095 if ( !$rev || strpos( $rev, '/' ) !== false || strpos( $rev, "\000" ) !== false ) {
9196 svnError( 'extdist-svn-parse-error', $result );
9297 return;

Status & tagging log