improving unit tests, fixing regression in DB model

This commit is contained in:
El RIDO
2015-09-27 14:36:20 +02:00
parent 694138c5d4
commit ce3f10f143
3 changed files with 77 additions and 9 deletions

View File

@@ -139,7 +139,7 @@ class zerobin_db extends zerobin_abstract
$tables = $statement->fetchAll(PDO::FETCH_COLUMN, 0);
// create paste table if needed
if (!array_key_exists(self::$_prefix . 'paste', $tables))
if (!in_array(self::$_prefix . 'paste', $tables))
{
self::$_db->exec(
'CREATE TABLE ' . self::$_prefix . 'paste ( ' .