Skip to content

Commit f4a24c4

Browse files
committed
fix: Fix php_container.php helper script
1 parent 45d5564 commit f4a24c4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

bin/helpers/php_container.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@
2727
// Get all the possible containers that could be started
2828
$php_containers_matches = array();
2929
preg_match_all("/php-([0-9]\.[0-9])[^:]*:/", file_get_contents("$docker_dev_root/compose/php.yml"), $php_containers_matches);
30-
preg_match_all("/php-([0-9]\.[0-9])[^:]*:/", file_get_contents("$docker_dev_root/compose/php-legacy.yml"), $php_containers_matches);
30+
$php_legacy_containers_matches = array();
31+
preg_match_all("/php-([0-9]\.[0-9])[^:]*:/", file_get_contents("$docker_dev_root/compose/php-legacy.yml"), $php_legacy_containers_matches);
3132
if (empty($php_containers_matches)) {
3233
fwrite(fopen('php://stderr', 'wb'), "Fatal regex error" . PHP_EOL);
3334
exit(1);
3435
}
35-
$php_containers_available = array_unique($php_containers_matches[1]);
36+
$php_containers_available = array_merge(array_unique($php_containers_matches[1]), array_unique($php_legacy_containers_matches[1]));
3637
asort($php_containers_available);
3738

3839
// Get the versions to use from the site composer.json (if it exists)

0 commit comments

Comments
 (0)