We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP Warning: foreach() argument must be of type array|object, bool given in UrlHelper.php on line 103
The text was updated successfully, but these errors were encountered:
将UrlHelper.php中的报错部分替换为下面的代码即可: ` /**
将图片 Srcsets Url 替换为 OSS Url
@param $sources
@return mixed */ public function replaceImgSrcsetUrl($sources) { // 检查 $sources 是否为数组 if (!is_array($sources)) { return $sources; }
// 遍历每个源 foreach ($sources as $k => $source) { if (is_array($source) && isset($source['url']) && !$this->is_excluded($source['url'])) { $sources[$k]['url'] = str_replace($this->wpBaseUrl, $this->ossBaseUrl, $source['url']);
if (Config::$sourceImgProtect && (false === strstr($sources[$k]['url'], Config::$customSeparator))) { $sources[$k]['url'] = $this->aliImageStyle($sources[$k]['url'], 'full'); } } $sources[$k]['url'] = $this->sign_url($sources[$k]['url']);
} return $sources; }` 修复版插件:https://github.com/TD-CLJI/aliyun-oss-new
Sorry, something went wrong.
No branches or pull requests
PHP Warning: foreach() argument must be of type array|object, bool given in UrlHelper.php on line 103
The text was updated successfully, but these errors were encountered: