Index: trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php |
— | — | @@ -199,8 +199,10 @@ |
200 | 200 | $db = dba_open( '/usr/local/apache/common/wikiversions.cdb', 'r', 'cdb' ); |
201 | 201 | if ( $db ) { |
202 | 202 | $version = dba_fetch( $this->getDatabase(), $db ); |
203 | | - if ( strpos( $version, 'php-' ) !== 0 ) { |
204 | | - die( "wikiversions.cdb entry should be of the format: php-...\n" ); |
| 203 | + if ( $version === false ) { |
| 204 | + die( "wikiversions.cdb has no entry for `$db`.\n" ); |
| 205 | + } elseif ( strpos( $version, 'php-' ) !== 0 ) { |
| 206 | + die( "wikiversions.cdb entry does not start with `php-` (got `$version`).\n" ); |
205 | 207 | } |
206 | 208 | } else { |
207 | 209 | //trigger_error( "Unable to open /usr/local/apache/common/wikiversions.cdb. Assuming php-1.17", E_USER_ERROR ); |