Index: trunk/phase3/maintenance/dumpTextPass.php |
— | — | @@ -87,8 +87,13 @@ |
88 | 88 | $this->lb->closeAll(); |
89 | 89 | unset( $this->lb ); |
90 | 90 | } |
91 | | - assert( '! isset( $this->db ) || ! $this->db->isOpen() /* DB is either unset, or been closed via LB */' ); |
| 91 | + |
| 92 | + if ( isset( $this->db ) && $this->db->isOpen() ) |
| 93 | + { |
| 94 | + throw new MWException( 'DB is set and has not been closed by the Load Balancer' ); |
| 95 | + } |
92 | 96 | |
| 97 | + |
93 | 98 | unset( $this->db ); |
94 | 99 | |
95 | 100 | // Trying to set up new connection. |
— | — | @@ -435,7 +440,6 @@ |
436 | 441 | throw new MWException( "Generic error while obtaining text for id " . $id ); |
437 | 442 | } |
438 | 443 | |
439 | | - assert( '$text !== false' ); |
440 | 444 | // We received a good candidate for the text of $id via some method |
441 | 445 | |
442 | 446 | // Step 2: Checking for plausibility and return the text if it is |
— | — | @@ -452,12 +456,9 @@ |
453 | 457 | return $text; |
454 | 458 | } |
455 | 459 | |
456 | | - assert( 'strlen( $text ) != $revLength /* Obtained text unplausible */' ); |
457 | 460 | $text = false; |
458 | 461 | throw new MWException( "Received text is unplausible for id " . $id ); |
459 | 462 | |
460 | | - assert( 'false /* text is either returned or exception has been thrown */' ); |
461 | | - |
462 | 463 | } catch (Exception $e) { |
463 | 464 | $msg = "getting/checking text " . $id . " failed (".$e->getMessage().")"; |
464 | 465 | if ( $failures + 1 < $this->maxFailures ) { |