From de3d1590ee9f93f1ccce1bf9a351d93bc0a2cbc3 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 8 Apr 2012 00:23:37 +0200 Subject: [PATCH] MDL-32323 fix PHPUnit diag regression --- lib/phpunit/lib.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/phpunit/lib.php b/lib/phpunit/lib.php index 253ee2c972c..91fc4d352ac 100644 --- a/lib/phpunit/lib.php +++ b/lib/phpunit/lib.php @@ -584,20 +584,16 @@ class phpunit_util { return array(131, 'Can not use test database, try changing prefix'); } + if (empty($tables)) { + return array(132, ''); + } + if (!file_exists("$CFG->dataroot/phpunit/tabledata.ser") or !file_exists("$CFG->dataroot/phpunit/tablestructure.ser")) { - if (empty($tables)) { - return array(132, ''); - } else { - return array(133, ''); - } + return array(133, ''); } if (!file_exists("$CFG->dataroot/phpunit/versionshash.txt")) { - if (empty($tables)) { - return array(132, ''); - } else { - return array(133, ''); - } + return array(133, ''); } $hash = phpunit_util::get_version_hash();