Short list syntax can be used

Signed-off-by: Yuriy Pikhtarev <iglix@me.com>
This commit is contained in:
Yuriy Pikhtarev 2018-06-24 15:21:55 +03:00
commit 742575bb56
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6
7 changed files with 10 additions and 10 deletions

View file

@ -248,7 +248,7 @@ function file_write($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $replac
$old_name = $file;
$ext = '';
if (preg_match('#^(.+)(\.[^\\\/]+)$#', $file, $matches)) {
list($old_name, $ext) = $matches;
[$old_name, $ext] = $matches;
}
$new_name = $old_name . '_[old]_' . date('Y-m-d_H-i-s_') . getmypid() . $ext;
clearstatcache();