Do not try to create itemcache directory if it already exist.
On FreeBSD, with more-or-less default PHP configuration, when mkdir() is called on already existing directory - it will produce a warning, that could flood all over cron mail. To prevent that flooding a directory existing should be checked.
This commit is contained in:
parent
86b41eec77
commit
6e27510173
6
boot.php
6
boot.php
|
@ -2175,7 +2175,7 @@ function zrl_init(&$a) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function zrl($s,$force = false) {
|
function zrl($s,$force = false) {i
|
||||||
if(! strlen($s))
|
if(! strlen($s))
|
||||||
return $s;
|
return $s;
|
||||||
if((! strpos($s,'/profile/')) && (! $force))
|
if((! strpos($s,'/profile/')) && (! $force))
|
||||||
|
@ -2335,7 +2335,9 @@ function get_itemcachepath() {
|
||||||
|
|
||||||
if ($temppath != "") {
|
if ($temppath != "") {
|
||||||
$itemcache = $temppath."/itemcache";
|
$itemcache = $temppath."/itemcache";
|
||||||
mkdir($itemcache);
|
if(!file_exists($itemcache) && !is_dir($itemcache)) {
|
||||||
|
mkdir($itemcache);
|
||||||
|
}
|
||||||
|
|
||||||
if (is_dir($itemcache) AND is_writable($itemcache)) {
|
if (is_dir($itemcache) AND is_writable($itemcache)) {
|
||||||
set_config("system", "itemcache", $itemcache);
|
set_config("system", "itemcache", $itemcache);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user