Skip to content
Snippets Groups Projects

fix(notice): Notice error when cannot create log file

Merged Krzysztof Dyszczyk requested to merge bugfix/notice into master
3 files
+ 14
4
Compare changes
  • Side-by-side
  • Inline

Files

+ 7
3
@@ -27,7 +27,7 @@ class WPCapture {
@@ -27,7 +27,7 @@ class WPCapture {
),
),
$dir
$dir
),
),
WPDesk\Notice\Notice::NOTICE_TYPE_ERROR
\WPDesk\Notice\Notice::NOTICE_TYPE_ERROR
);
);
}
}
@@ -46,7 +46,7 @@ class WPCapture {
@@ -46,7 +46,7 @@ class WPCapture {
),
),
$file
$file
),
),
WPDesk\Notice\Notice::NOTICE_TYPE_ERROR
\WPDesk\Notice\Notice::NOTICE_TYPE_ERROR
);
);
}
}
@@ -87,7 +87,11 @@ class WPCapture {
@@ -87,7 +87,11 @@ class WPCapture {
}
}
}
}
return true;
if (!is_writable($log_file)) {
 
$this->add_notice_for_file($log_file);
 
return false;
 
}
 
return true;
}
}
/**
/**
Loading