mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 00:41:52 +00:00
Downgrade directory not found and permissions errors to warnings.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
parent
0c9dc02d4a
commit
1b962e68f0
@ -114,7 +114,7 @@ class HTMLPurifier_DefinitionCache_Serializer extends
|
|||||||
if (!is_dir($base)) {
|
if (!is_dir($base)) {
|
||||||
trigger_error('Base directory '.$base.' does not exist,
|
trigger_error('Base directory '.$base.' does not exist,
|
||||||
please create or change using %Cache.SerializerPath',
|
please create or change using %Cache.SerializerPath',
|
||||||
E_USER_ERROR);
|
E_USER_WARNING);
|
||||||
return false;
|
return false;
|
||||||
} elseif (!$this->_testPermissions($base)) {
|
} elseif (!$this->_testPermissions($base)) {
|
||||||
return false;
|
return false;
|
||||||
@ -139,7 +139,7 @@ class HTMLPurifier_DefinitionCache_Serializer extends
|
|||||||
// generally, you'll want to handle this beforehand
|
// generally, you'll want to handle this beforehand
|
||||||
// so a more specific error message can be given
|
// so a more specific error message can be given
|
||||||
trigger_error('Directory '.$dir.' does not exist',
|
trigger_error('Directory '.$dir.' does not exist',
|
||||||
E_USER_ERROR);
|
E_USER_WARNING);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (function_exists('posix_getuid')) {
|
if (function_exists('posix_getuid')) {
|
||||||
@ -157,12 +157,12 @@ class HTMLPurifier_DefinitionCache_Serializer extends
|
|||||||
}
|
}
|
||||||
trigger_error('Directory '.$dir.' not writable, '.
|
trigger_error('Directory '.$dir.' not writable, '.
|
||||||
'please chmod to ' . $chmod,
|
'please chmod to ' . $chmod,
|
||||||
E_USER_ERROR);
|
E_USER_WARNING);
|
||||||
} else {
|
} else {
|
||||||
// generic error message
|
// generic error message
|
||||||
trigger_error('Directory '.$dir.' not writable, '.
|
trigger_error('Directory '.$dir.' not writable, '.
|
||||||
'please alter file permissions',
|
'please alter file permissions',
|
||||||
E_USER_ERROR);
|
E_USER_WARNING);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user