webflo / drupal-finder

GNU General Public License v2.0
126 stars 25 forks source link

PHP Fatal error: Uncaught TypeError: is_link(): Argument #1 ($filename) must be of type string #70

Open kunalsahu-git opened 1 month ago

kunalsahu-git commented 1 month ago

ddev drush cr PHP Fatal error: Uncaught TypeError: is_link(): Argument #1 ($filename) must be of type string, Drush\Config\Environment given in /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php:153 Stack trace:

0 /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php(153): is_link(Object(Drush\Config\Environment))

1 /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php(75): DrupalFinder\DrupalFinder->discoverRoots(Object(Drush\Config\Environment))

2 /var/www/html/vendor/drush/drush/src/Preflight/Preflight.php(311): DrupalFinder\DrupalFinder->__construct(Object(Drush\Config\Environment))

3 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(58): Drush\Preflight\Preflight->preflight(Array)

4 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))

5 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)

6 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')

7 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...')

8 {main}

thrown in /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php on line 153

Fatal error: Uncaught TypeError: is_link(): Argument #1 ($filename) must be of type string, Drush\Config\Environment given in /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php:153 Stack trace:

0 /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php(153): is_link(Object(Drush\Config\Environment))

1 /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php(75): DrupalFinder\DrupalFinder->discoverRoots(Object(Drush\Config\Environment))

2 /var/www/html/vendor/drush/drush/src/Preflight/Preflight.php(311): DrupalFinder\DrupalFinder->__construct(Object(Drush\Config\Environment))

3 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(58): Drush\Preflight\Preflight->preflight(Array)

4 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))

5 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)

6 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')

7 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...')

8 {main}

thrown in /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php on line 153

image

kunalsahu-git commented 1 month ago

`<?php

/**

/**

} `

Changing the code to this lets it work.

kunalsahu-git commented 1 month ago

PR has been raised to fix this issue. https://github.com/webflo/drupal-finder/pull/71