EC-CUBE /
ec-cube
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /* |
||
| 3 | * This file is part of EC-CUBE |
||
| 4 | * |
||
| 5 | * Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved. |
||
| 6 | * |
||
| 7 | * http://www.lockon.co.jp/ |
||
| 8 | * |
||
| 9 | * This program is free software; you can redistribute it and/or |
||
| 10 | * modify it under the terms of the GNU General Public License |
||
| 11 | * as published by the Free Software Foundation; either version 2 |
||
| 12 | * of the License, or (at your option) any later version. |
||
| 13 | * |
||
| 14 | * This program is distributed in the hope that it will be useful, |
||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 17 | * GNU General Public License for more details. |
||
| 18 | * |
||
| 19 | * You should have received a copy of the GNU General Public License |
||
| 20 | * along with this program; if not, write to the Free Software |
||
| 21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
||
| 22 | */ |
||
| 23 | |||
| 24 | |||
| 25 | namespace Eccube\Controller\Admin\Content; |
||
| 26 | |||
| 27 | use Eccube\Application; |
||
| 28 | use Eccube\Controller\AbstractController; |
||
| 29 | use Eccube\Util\Cache; |
||
| 30 | use Symfony\Component\HttpFoundation\Request; |
||
| 31 | |||
| 32 | class CacheController extends AbstractController |
||
| 33 | { |
||
| 34 | |||
| 35 | 2 | public function index(Application $app, Request $request) |
|
| 36 | { |
||
| 37 | |||
| 38 | 2 | $form = $app->form()->getForm(); |
|
| 39 | |||
| 40 | 2 | if ('POST' === $request->getMethod()) { |
|
| 41 | |||
| 42 | 1 | $form->handleRequest($request); |
|
| 43 | |||
| 44 | 1 | if ($form->isValid()) { |
|
| 45 | |||
| 46 | 1 | switch ($request->get('mode')) { |
|
| 47 | 1 | case 'twig': |
|
| 48 | // Twigキャッシュクリア |
||
| 49 | 1 | Cache::clear($app, false, true); |
|
|
0 ignored issues
–
show
|
|||
| 50 | 1 | $app->addSuccess('admin.content.twig.cache.save.complete', 'admin'); |
|
| 51 | 1 | break; |
|
| 52 | default: |
||
| 53 | 1 | break; |
|
| 54 | } |
||
| 55 | } |
||
| 56 | } |
||
| 57 | |||
| 58 | 2 | return $app->render('Content/cache.twig', array( |
|
| 59 | 2 | 'form' => $form->createView(), |
|
| 60 | )); |
||
| 61 | } |
||
| 62 | } |
||
| 63 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: