mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-07-01 13:12:49 +08:00
fix(Post): 修复排版内容副本读取时配置字段类型转换问题
确保从 postOutput 配置中读取 content_html 时,配置字段已转换为数组,避免因对象类型导致的错误。
This commit is contained in:
@@ -368,9 +368,12 @@ class Post extends Common
|
||||
// 排版内容副本:优先使用已保存的副本,否则使用原文
|
||||
$layoutContentHtml = $model_post->content_html;
|
||||
$layoutConfig = [];
|
||||
if ($postOutput && !empty($postOutput->config['content_html'])) {
|
||||
$layoutContentHtml = $postOutput->config['content_html'];
|
||||
$layoutConfig = $postOutput->config;
|
||||
if ($postOutput && !empty($postOutput->config)) {
|
||||
$config = (array) $postOutput->config;
|
||||
if (!empty($config['content_html'])) {
|
||||
$layoutContentHtml = $config['content_html'];
|
||||
$layoutConfig = $config;
|
||||
}
|
||||
}
|
||||
|
||||
View::assign('post', $model_post);
|
||||
|
||||
BIN
debug-phone-image.png
Normal file
BIN
debug-phone-image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 167 KiB |
BIN
qa-douyin-size-thumbnails.png
Normal file
BIN
qa-douyin-size-thumbnails.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
qa-phone-image-overview.png
Normal file
BIN
qa-phone-image-overview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
qa-thumbnails-page-numbers.png
Normal file
BIN
qa-thumbnails-page-numbers.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
Reference in New Issue
Block a user