-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function multiselect in windows return index as options but in ubuntu returns value of options #178
Comments
What type of keys does |
hello, $uploadDirectories have string values of paths like:
upload/users,
upload/profiles,
...
in ubuntu returns value path and in windows returns index of values
thank you for this package.
…On Sat, Dec 14, 2024, 3:48 PM Jess Archer ***@***.***> wrote:
What type of keys does $uploadDirectories have? Are they strings or
integers? If integers, are they sequential starting from 0?
—
Reply to this email directly, view it on GitHub
<#178 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVQZHW5VOD3PZFNV7J4SGCD2FQSIVAVCNFSM6AAAAABTTJYIG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBTGA4TKMZRGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm having trouble replicating this one. When you say Windows, are you talking about native Windows (i.e. To try to replicate this, I've created a command with the following: <?php
dump(
multiselect('test', [
'upload/users',
'upload/profiles',
], required: true)
);
Prompt::fallbackWhen(true); // Simulate running on Windows using the Symfony console fallback.
dump(
multiselect('test', [
'upload/users',
'upload/profiles',
], required: true)
); When running the command, I tried selecting all possible combinations (the first option, the second option, and both options) and always received the values: Are you sure the array you pass in has sequential numeric keys starting from 0? If you pass it through |
Thanks @HusseinIbrahem. I've just realised the problem is with the older version of Laravel you're using. This issue was fixed in the following PRs:
Upgrading to the latest version of Laravel should fix the issue for you. |
Laravel Prompts Version
0.1.25
Laravel Version
10.48.23
PHP Version
8.2
Operating System & Version
windows 10 , ubutnu
Terminal Application
power shel
Description
this code :
in windows returns key of selected but in ubuntu returns the values nad i have to write this code to prevent any error in any operating system:
Steps To Reproduce
nothing
The text was updated successfully, but these errors were encountered: