note 102577 added to function.unlink

[email protected] Tue, 22 Feb 2011 09:51:08 -0800
Newsgroups php.notes
Message-ID <[email protected]>
Argh, there is a little bug sry for this...

<?php
if(is_writeable($tmp_path.DS.$tmp) && is_dir($tmp_path.DS.$tmp)){
	 k8c_admin_area_write::k8c_delete_folder($tmp_path.DS.$tmp);
}elseif(!is_writeable($tmp_path.DS.$tmp) && is_dir($tmp_path.DS.$tmp)){
 chmod($tmp_path.DS.$tmp,0777);
 delete_folder($tmp_path.DS.$tmp);
}
?>

need to be replaced trough:

<?php
if(is_writeable($tmp_path.DS.$tmp) && is_dir($tmp_path.DS.$tmp)){
	 delete_folder($tmp_path.DS.$tmp);
}elseif(!is_writeable($tmp_path.DS.$tmp) && is_dir($tmp_path.DS.$tmp)){
 chmod($tmp_path.DS.$tmp,0777);
 delete_folder($tmp_path.DS.$tmp);
}
?>
----
Server IP: 85.214.154.209
Probable Submitter: 77.22.31.182
----
Manual Page -- http://www.php.net/manual/en/function.unlink.php
Edit        -- https://master.php.net/note/edit/102577
Del: integrated  -- https://master.php.net/note/delete/102577/integrated
Del: useless     -- https://master.php.net/note/delete/102577/useless
Del: bad code    -- https://master.php.net/note/delete/102577/bad+code
Del: spam        -- https://master.php.net/note/delete/102577/spam
Del: non-english -- https://master.php.net/note/delete/102577/non-english
Del: in docs     -- https://master.php.net/note/delete/102577/in+docs
Del: other reasons-- https://master.php.net/note/delete/102577
Reject      -- https://master.php.net/note/reject/102577
Search      -- https://master.php.net/manage/user-notes.php