projects
/
thericegoat.com.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39a80a1
)
accept null as input and returm if so
author
Eduardo
<
[email protected]
>
Fri, 10 Nov 2023 02:22:50 +0000
(
03:22
+0100)
committer
Eduardo
<
[email protected]
>
Fri, 10 Nov 2023 02:22:50 +0000
(
03:22
+0100)
page-generator/generator.php
patch
|
blob
|
history
diff --git
a/page-generator/generator.php
b/page-generator/generator.php
index 15a724e7c50fa7fd71d9e932c6724cfc759ed74b..c7e5f3a3a811e1f77b72f2da3d0667cd6fe196c2 100644
(file)
--- a/
page-generator/generator.php
+++ b/
page-generator/generator.php
@@
-57,8
+57,11
@@
class CodeGenerator
/**
* Create or append to a file ($filePath) the text in $content
*/
- function writeToFile(string $filePath, string $content)
+ function writeToFile(string $filePath, string
| null
$content)
{
+ if (is_null($content))
+ return;
+
file_put_contents($filePath, $content, FILE_APPEND | LOCK_EX);
}