| Conditions | 3 |
| Paths | 2 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function checkForVarDirectoryProblem(ConsoleCommandEvent $event): bool |
||
| 35 | { |
||
| 36 | $tempVarDir = sys_get_temp_dir() . '/magento/var'; |
||
| 37 | |||
| 38 | if ((!OutputInterface::VERBOSITY_NORMAL) <= $event->getOutput()->getVerbosity() && !is_dir($tempVarDir)) { |
||
| 39 | return true; |
||
| 40 | } |
||
| 41 | |||
| 42 | $event->getOutput()->writeln([ |
||
|
|
|||
| 43 | sprintf('<warning>Cache fallback folder %s was found.</warning>', $tempVarDir), |
||
| 44 | '', |
||
| 45 | 'n98-magerun2 is using the fallback folder. If there is another folder configured for Magento, this ' . |
||
| 46 | 'can cause serious problems.', |
||
| 47 | 'Please refer to https://github.com/netz98/n98-magerun/wiki/File-system-permissions ' . |
||
| 48 | 'for more information.', |
||
| 49 | '', |
||
| 50 | ]); |
||
| 51 | |||
| 52 | return false; |
||
| 53 | } |
||
| 54 | } |
||
| 55 |
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: