mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06: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,9 +866,15 @@
|
||||||
}
|
}
|
||||||
$res = @fopen($fileName, 'w+b');
|
$res = @fopen($fileName, 'w+b');
|
||||||
if ($res) {
|
if ($res) {
|
||||||
@fwrite($res, $data);
|
$write = @fwrite($res, $data);
|
||||||
|
if($write === false) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return $write;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Reads/writes temporary data to cache files or session.
|
* Reads/writes temporary data to cache files or session.
|
||||||
|
|
Loading…
Add table
Reference in a new issue