File tree 5 files changed +6
-6
lines changed
5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class PostList extends \Magefan\Blog\Block\Post\PostList
21
21
*/
22
22
public function getQuery ()
23
23
{
24
- return urldecode ($ this ->getRequest ()->getParam ('q ' ));
24
+ return ( string ) urldecode ($ this ->getRequest ()->getParam ('q ' ));
25
25
}
26
26
27
27
/**
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public function execute()
49
49
*/
50
50
protected function _initAuthor ()
51
51
{
52
- $ id = $ this ->getRequest ()->getParam ('id ' );
52
+ $ id = ( int ) $ this ->getRequest ()->getParam ('id ' );
53
53
54
54
$ author = $ this ->_objectManager ->create (\Magefan \Blog \Api \AuthorInterface::class)->load ($ id );
55
55
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public function execute()
62
62
*/
63
63
protected function _initCategory ()
64
64
{
65
- $ id = $ this ->getRequest ()->getParam ('id ' );
65
+ $ id = ( int ) $ this ->getRequest ()->getParam ('id ' );
66
66
$ storeId = $ this ->_storeManager ->getStore ()->getId ();
67
67
68
68
$ category = $ this ->_objectManager ->create (\Magefan \Blog \Model \Category::class)->load ($ id );
Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ public function execute()
62
62
*/
63
63
protected function _initPost ()
64
64
{
65
- $ id = $ this ->getRequest ()->getParam ('id ' );
66
- $ secret = $ this ->getRequest ()->getParam ('secret ' );
65
+ $ id = ( int ) $ this ->getRequest ()->getParam ('id ' );
66
+ $ secret = ( string ) $ this ->getRequest ()->getParam ('secret ' );
67
67
$ storeId = $ this ->_storeManager ->getStore ()->getId ();
68
68
69
69
$ post = $ this ->_objectManager ->create (\Magefan \Blog \Model \Post::class)->load ($ id );
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public function execute()
45
45
*/
46
46
protected function _initTag ()
47
47
{
48
- $ id = $ this ->getRequest ()->getParam ('id ' );
48
+ $ id = ( int ) $ this ->getRequest ()->getParam ('id ' );
49
49
50
50
$ tag = $ this ->_objectManager ->create (\Magefan \Blog \Model \Tag::class)->load ($ id );
51
51
You can’t perform that action at this time.
0 commit comments