File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 24
24
<a href="<?= Url::to (['post/view ' , 'id ' => $ headline ->id ]) ?> "><img src="<?= $ headline ->thumbnail ?> " alt="<?= Html::encode ($ headline ->title ) ?> " style="width:100%;"></a>
25
25
</div>
26
26
<?php endif ?>
27
- <?php if ($ recommend [0 ]): ?>
27
+ <?php if (! empty ( $ recommend [0 ]) ): ?>
28
28
<div class="recommend clearfix">
29
29
<div class="pull-left" style="width:48%">
30
30
<h4><a href="<?= Url::to (['post/view ' , 'id ' => $ recommend [0 ]['id ' ]]) ?> "><?= Html::encode ($ recommend [0 ]['title ' ]) ?> </a></h4>
31
31
<a href="<?= Url::to (['post/view ' , 'id ' => $ recommend [0 ]['id ' ]]) ?> "><img src="<?= $ recommend [0 ]['thumbnail ' ] ?> " alt="<?= Html::encode ($ recommend [0 ]['title ' ]) ?> " style="width:280px;"></a>
32
32
<p><?= Html::encode ($ recommend [0 ]->MakeSummary ) ?> </p>
33
33
</div>
34
- <?php if ($ recommend [1 ]): ?>
34
+ <?php if (! empty ( $ recommend [1 ]) ): ?>
35
35
<div class="pull-right" style="width:48%">
36
36
<h4><a href="<?= Url::to (['post/view ' , 'id ' => $ recommend [1 ]['id ' ]]) ?> "><?= Html::encode ($ recommend [1 ]['title ' ]) ?> </a></h4>
37
37
<a href="<?= Url::to (['post/view ' , 'id ' => $ recommend [1 ]['id ' ]]) ?> "><img src="<?= $ recommend [1 ]['thumbnail ' ] ?> " alt="<?= Html::encode ($ recommend [1 ]['title ' ]) ?> " style="width:280px;"></a>
You can’t perform that action at this time.
0 commit comments