supress warnings from unlink() and is_dir(), let error handler deal with it

This commit is contained in:
mohrt
2002-08-08 16:32:08 +00:00
parent b44abd6ec4
commit 2256b443c9
3 changed files with 11 additions and 11 deletions

View File

@@ -15,7 +15,7 @@ Plugins now stop execution upon error, instead of outputting a warning and
continuing.
Two new API functions, assign_by_ref() and append_by_ref() were added. They
allow assigning template variables by reference. This can make a significance
allow assigning template variables by reference. This can make a significant
performance gain, especially if you are assigning large arrays of data. PHP 5.0
will do this implicitly, so these functions are basically workarounds.

View File

@@ -1514,7 +1514,7 @@ function _run_insert_handler($args)
\*======================================================================*/
function _rm_auto($auto_base, $auto_source = null, $auto_id = null, $exp_time = null)
{
if (!is_dir($auto_base))
if (!@is_dir($auto_base))
return false;
if(!isset($auto_id) && !isset($auto_source)) {
@@ -1523,7 +1523,7 @@ function _run_insert_handler($args)
$tname = $this->_get_auto_filename($auto_base, $auto_source, $auto_id);
if(isset($auto_source)) {
$res = @unlink($tname);
$res = $this->_unlink($tname);
} elseif ($this->use_sub_dirs) {
$res = $this->_rmdir($tname, 1, $exp_time);
} else {
@@ -1554,7 +1554,7 @@ function _run_insert_handler($args)
while ($entry = readdir($handle)) {
if ($entry != '.' && $entry != '..') {
if (is_dir($dirname . DIR_SEP . $entry)) {
if (@is_dir($dirname . DIR_SEP . $entry)) {
$this->_rmdir($dirname . DIR_SEP . $entry, $level + 1, $exp_time);
}
else {
@@ -1583,10 +1583,10 @@ function _run_insert_handler($args)
{
if(isset($exp_time)) {
if(time() - filemtime($resource) >= $exp_time) {
unlink($resource);
@unlink($resource);
}
} else {
unlink($resource);
@unlink($resource);
}
}

View File

@@ -1514,7 +1514,7 @@ function _run_insert_handler($args)
\*======================================================================*/
function _rm_auto($auto_base, $auto_source = null, $auto_id = null, $exp_time = null)
{
if (!is_dir($auto_base))
if (!@is_dir($auto_base))
return false;
if(!isset($auto_id) && !isset($auto_source)) {
@@ -1523,7 +1523,7 @@ function _run_insert_handler($args)
$tname = $this->_get_auto_filename($auto_base, $auto_source, $auto_id);
if(isset($auto_source)) {
$res = @unlink($tname);
$res = $this->_unlink($tname);
} elseif ($this->use_sub_dirs) {
$res = $this->_rmdir($tname, 1, $exp_time);
} else {
@@ -1554,7 +1554,7 @@ function _run_insert_handler($args)
while ($entry = readdir($handle)) {
if ($entry != '.' && $entry != '..') {
if (is_dir($dirname . DIR_SEP . $entry)) {
if (@is_dir($dirname . DIR_SEP . $entry)) {
$this->_rmdir($dirname . DIR_SEP . $entry, $level + 1, $exp_time);
}
else {
@@ -1583,10 +1583,10 @@ function _run_insert_handler($args)
{
if(isset($exp_time)) {
if(time() - filemtime($resource) >= $exp_time) {
unlink($resource);
@unlink($resource);
}
} else {
unlink($resource);
@unlink($resource);
}
}