From 85c51ba6ae84d1b6b257bd8dde6b4b2905efe6ab Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Tue, 23 Aug 2016 19:39:43 +0000 Subject: [PATCH] file : define the default value for flags in file_put_contents. It is optional git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3005 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- file.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/file.php b/file.php index 09214fb..301b156 100644 --- a/file.php +++ b/file.php @@ -183,12 +183,13 @@ class file /** Write a string to a file * @param string $filename Path to the file where to write the data - * @param The data to write + * @param string $data The data to write + * @param int|null $flags The optional flags * @return the length of the data stored * @throws If parent directory not exists, is not writeable, or the file * exists and is not writeable */ - public function file_put_contents ($filename, $data, $flags) + public function file_put_contents ($filename, $data, $flags=0) { $this->debug (2, "file_put_contents ($filename)"); $filename = $this->realpath ($filename);