mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
1.2: updated file_put_contents in basics to return number of bytes written or false
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3721 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
8115129597
commit
755e3dbae1
1 changed files with 7 additions and 1 deletions
|
@ -866,8 +866,14 @@
|
|||
}
|
||||
$res = @fopen($fileName, 'w+b');
|
||||
if ($res) {
|
||||
@fwrite($res, $data);
|
||||
$write = @fwrite($res, $data);
|
||||
if($write === false) {
|
||||
return false;
|
||||
} else {
|
||||
return $write;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue