Do not attemp to load marker data from a non-existent htaccess. Bug 308.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7f5ef5c1d3
commit
217dd27ea9
|
@ -426,7 +426,12 @@ function check_admin_referer() {
|
|||
// Returns true on write success, false on failure.
|
||||
function insert_with_markers($filename, $marker, $insertion) {
|
||||
if (!file_exists($filename) || is_writeable($filename)) {
|
||||
if (!file_exists($filename)) {
|
||||
$markerdata = '';
|
||||
} else {
|
||||
$markerdata = explode("\n", implode('', file($filename)));
|
||||
}
|
||||
|
||||
$f = fopen($filename, 'w');
|
||||
$foundit = false;
|
||||
if ($markerdata) {
|
||||
|
@ -462,6 +467,11 @@ function insert_with_markers($filename, $marker, $insertion) {
|
|||
// and END markers.
|
||||
function extract_from_markers($filename, $marker) {
|
||||
$result = array();
|
||||
|
||||
if (!file_exists($filename)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if($markerdata = explode("\n", implode('', file($filename))));
|
||||
{
|
||||
$state = false;
|
||||
|
|
Loading…
Reference in New Issue