diff --git a/aliyun-oss-wordpress.php b/aliyun-oss-wordpress.php index d0c1506..eaa4236 100644 --- a/aliyun-oss-wordpress.php +++ b/aliyun-oss-wordpress.php @@ -254,6 +254,7 @@ function oss_upload_thumbs($metadata) //获取上传路径 $wp_uploads = wp_upload_dir(); $basedir = $wp_uploads['basedir']; + $upload_path = oss_get_option('upload_path'); //获取oss插件的配置信息 $oss_options = get_option('oss_options', true); @@ -263,7 +264,6 @@ function oss_upload_thumbs($metadata) if (!empty($metadata['file'])) { // Maybe there is a problem with the old version $file = $basedir . '/' . $metadata['file']; - $upload_path = oss_get_option('upload_path'); if ($upload_path != '.') { $path_array = explode($upload_path, $file); if (count($path_array) >= 2) { @@ -434,7 +434,7 @@ function oss_read_dir_queue($homePath, $uploadPath) $foundFiles = []; while (!$dirsToProcess->isEmpty()) { - [$currentDir, $relativeDir] = $dirsToProcess->dequeue(); + list($currentDir, $relativeDir) = $dirsToProcess->dequeue(); foreach (new DirectoryIterator($currentDir) as $fileInfo) { if ($fileInfo->isDot()) continue; diff --git a/readme.txt b/readme.txt index 34d4e7a..1348f55 100644 --- a/readme.txt +++ b/readme.txt @@ -4,8 +4,8 @@ Donate link: https://qq52o.me/sponsor.html Tags: oss, 阿里云, 对象存储, aliyun Requires at least: 4.2 Tested up to: 6.3 -Requires PHP: 7.0.0 -Stable tag: 1.4.4 +Requires PHP: 7.0 +Stable tag: 1.4.5 License: Apache2.0 License URI: http://www.apache.org/licenses/LICENSE-2.0.html @@ -73,6 +73,10 @@ License URI: http://www.apache.org/licenses/LICENSE-2.0.html == Changelog == += 1.4.5 = + +- 兼容 PHP 7.0 + = 1.4.4 = - 修复超大文件原图上传和删除