Test Failed
Push — master ( e3c39f...fe570d )
by Mihail
07:20
created

Apps/View/Front/default/profile/wall_delete.php (2 issues)

Checks if an incompatible expression is used in output or concatination.

Bug Minor
1
<?php
2
3
use Ffcms\Core\Helper\Date;
4
use Ffcms\Templex\Url\Url;
5
6
/** @var $post \Apps\ActiveRecord\WallPost */
7
/** @var $model \Apps\Model\Front\Profile\FormWallPostDelete */
8
/** @var \Ffcms\Templex\Template\Template $this */
9
10
11
$this->layout('_layouts/default', [
12
    'title' => __('Delete post'),
13
    'breadcrumbs' => [
14
        Url::to('/') => __('Home'),
15
        Url::to('profile/show', [App::$User->identity()->getId()]) => __('Profile'),
16
        __('Delete post')
17
    ]
18
]);
19
?>
20
21
<?php $this->start('body') ?>
22
<h1><?= __('Delete wall post') ?></h1>
23
<hr />
24
<p><?= __('Are you sure to delete this post? No more attention will be displayed!') ?></p>
25
<div class="row" id="wall-post-<?= $post->id ?>">
26
    <div class="col-md-2">
27
        <div class="text-center">
28
            <img class="img-fluid img-rounded" alt="Avatar of <?= $post->senderUser->profile->getNickname() ?>" src="<?= $post->senderUser->profile->getAvatarUrl('small') ?>" />
29
        </div>
30
    </div>
31
    <div class="col-md-10">
32
        <h5 style="margin-top: 0;">
33
            <i class="fa fa-pencil"></i> <?= Url::a(['profile/show', [$post->sender_id]], $post->senderUser->profile->getNickname()) ?>
34
            <small class="float-right"><?= Date::convertToDatetime($post->updated_at, Date::FORMAT_TO_SECONDS); ?></small>
0 ignored issues
show
Are you sure Ffcms\Core\Helper\Date::...ate::FORMAT_TO_SECONDS) of type false|string can be used in echo? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

34
            <small class="float-right"><?= /** @scrutinizer ignore-type */ Date::convertToDatetime($post->updated_at, Date::FORMAT_TO_SECONDS); ?></small>
Loading history...
35
        </h5>
36
        <div class="wall-post-text">
37
            <?= \App::$Security->strip_tags($post->message); ?>
0 ignored issues
show
Are you sure App::Security->strip_tags($post->message) of type array|null|string can be used in echo? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

37
            <?= /** @scrutinizer ignore-type */ \App::$Security->strip_tags($post->message); ?>
Loading history...
38
        </div>
39
     </div>
40
</div>
41
42
<?php $form = $this->form($model); ?>
43
<?= $form->start() ?>
44
<?= $form->field()->hidden('id'); ?>
45
<div class="row mt-1">
46
    <div class="col-md-12">
47
        <input type="submit" name="<?= $model->getFormName() ?>[submit]" value="<?=__('Delete')?>" class="btn btn-danger" />
48
    </div>
49
</div>
50
<?= $form->stop() ?>
51
52
<?php $this->stop() ?>
53