From 6e26559d6110b0190fb46f2222bd73f7545afa6a Mon Sep 17 00:00:00 2001 From: vincent zhao Date: Wed, 17 Jun 2015 15:02:07 +1000 Subject: [PATCH] silient warning, this is annoying --- lib/Analytics/Consumer/Fornax.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Analytics/Consumer/Fornax.php b/lib/Analytics/Consumer/Fornax.php index 96e088c..2945525 100644 --- a/lib/Analytics/Consumer/Fornax.php +++ b/lib/Analytics/Consumer/Fornax.php @@ -30,8 +30,10 @@ public function __construct($secret, $options = array()) { $options['filename'] = $this->getFilename(); try { - $this->file_handle = fopen($options["filename"], "a"); - chmod($options["filename"], $options["filepermissions"]); + $this->file_handle = @fopen($options["filename"], "a"); + if ($this->file_handle) { + chmod($options["filename"], $options["filepermissions"]); + } } catch (\Exception $e) { $this->handleError($e->getCode(), $e->getMessage()); }