diff --git a/php/includes/storage.php b/php/includes/storage.php index e03cc94..4090c48 100644 --- a/php/includes/storage.php +++ b/php/includes/storage.php @@ -16,10 +16,11 @@ try { $this->db = new PDO($this->dbType . $this->dbLocation); if(!$this->db) { - throw new StorageConnectionException($err); + $this->db = null; + throw new StorageConnectionException(); } } catch (Exception $e) { - + $this->db = null; } } } @@ -298,4 +299,4 @@ class StorageSchemaException extends StorageException { } - class StorageConnectionException extends StorageException { } \ No newline at end of file + class StorageConnectionException extends StorageException { }