fixing nasty deletion bug from #15, included unit tests to trigger it

and reworked persistence classes to through exceptions rather to fail
silently
This commit is contained in:
El RIDO
2015-08-27 21:41:21 +02:00
parent d042bb41ba
commit f775da3931
11 changed files with 334 additions and 134 deletions

View File

@@ -38,8 +38,8 @@ class zerobin_data extends zerobin_abstract
{
// if given update the data directory
if (
is_array($options) &&
array_key_exists('dir', $options)
is_array($options) &&
array_key_exists('dir', $options)
) self::$_dir = $options['dir'] . DIRECTORY_SEPARATOR;
// if needed initialize the singleton
if(!(self::$_instance instanceof zerobin_data)) {