Skip to content

Conversation

@fubarhouse
Copy link
Contributor

This PR fixes the references to the return variable, by referencing $last['system.cron_last'] instead of $last, because $last is a keyed array which otherwise produces the following error:

Warning: date() expects parameter 2 to be integer, array given in /Users/karl/Downloads/drutiny-nightly-rework_drutiny/drutiny-nightly/x/vendor/drutiny/plugin-drupal-8/src/Audit/CronLast.php on line 34

Fatal error: Uncaught Error: Unsupported operand types in /Users/karl/Downloads/drutiny-nightly-rework_drutiny/drutiny-nightly/x/vendor/drutiny/plugin-drupal-8/src/Audit/CronLast.php:36
Stack trace:
#0 /Users/karl/Downloads/drutiny-nightly-rework_drutiny/drutiny-nightly/x/vendor/drutiny/drutiny/src/Audit.php(76): Drutiny\Plugin\Drupal8\Audit\CronLast->audit(Object(Drutiny\Sandbox\Sandbox))
#1 /Users/karl/Downloads/drutiny-nightly-rework_drutiny/drutiny-nightly/x/vendor/drutiny/drutiny/src/Sandbox/Sandbox.php(94): Drutiny\Audit->execute(Object(Drutiny\Sandbox\Sandbox))
#2 /Users/karl/Downloads/drutiny-nightly-rework_drutiny/drutiny-nightly/x/vendor/drutiny/drutiny/src/Assessment.php(58): Drutiny\Sandbox\Sandbox->run()
#3 /Users/karl/Downloads/drutiny-nightly-rework_drutiny/drutiny-nightly/x/vendor/drutiny/drutiny/src/Command/ProfileRunCommand.php(258): Drutiny\Assessment->assessTarget(Object(Drutiny\Target\DrushTarget), Array, Object(DateTime), Object(DateTime), false)

@fiasco
Copy link
Collaborator

fiasco commented Feb 18, 2019

Hey @fubarhouse which Drush version does this apply to? I presume 9? Because I suspect this change would break with Drush 8 and versions earlier than Drupal 8.3

@fubarhouse
Copy link
Contributor Author

@fiasco,

This affects Drush version 9.5.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants