mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
[php] add PHP error handler and remove @ error-control operator
This commit is contained in:
@@ -99,7 +99,7 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
|
||||
|
||||
|
||||
$this->db = new mysqli($this->options['host'], $this->options['user'], $this->options['pass'], $this->options['db'], $this->options['port'], $this->options['socket']);
|
||||
if ($this->db->connect_error || @mysqli_connect_error()) {
|
||||
if ($this->db->connect_error || mysqli_connect_error()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -136,8 +136,8 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
|
||||
|
||||
if (($tmp = $this->options['tmpPath'])) {
|
||||
if (!file_exists($tmp)) {
|
||||
if (@mkdir($tmp)) {
|
||||
@chmod($tmp, $this->options['tmbPathMode']);
|
||||
if (mkdir($tmp)) {
|
||||
chmod($tmp, $this->options['tmbPathMode']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -599,8 +599,8 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
|
||||
**/
|
||||
protected function _fopen($path, $mode='rb') {
|
||||
$fp = $this->tmbPath
|
||||
? @fopen($this->getTempFile($path), 'w+')
|
||||
: @tmpfile();
|
||||
? fopen($this->getTempFile($path), 'w+')
|
||||
: tmpfile();
|
||||
|
||||
|
||||
if ($fp) {
|
||||
@@ -626,9 +626,9 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
|
||||
* @author Dmitry (dio) Levashov
|
||||
*/
|
||||
protected function _fclose($fp, $path='') {
|
||||
@fclose($fp);
|
||||
fclose($fp);
|
||||
if ($path) {
|
||||
@unlink($this->getTempFile($path));
|
||||
unlink($this->getTempFile($path));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user