laravel / prompts

Beautiful and user-friendly forms for your command-line PHP applications.
https://laravel.com/docs/prompts
MIT License
533 stars 94 forks source link

Number 0 key in text field causes 'Uninitialized string offset 0' exemption in TypedValue.php #94

Closed stevenjweirstreet closed 1 year ago

stevenjweirstreet commented 1 year ago

Laravel Prompts Version

0.1.11

Laravel Version

8.83.27

PHP Version

8.2.11

Operating System & Version

macOS 13.0

Terminal Application

Warp

Description

When using a text() field, in Laravel 8 at least, when the zero number key is pressed, it is causing an ErrorException as shown below here vendor/laravel/prompts/src/Concerns/TypedValue.php:43. This is with or without other alpha-numeric characters, as soon as zero is pressed, the exception fires.

You can paste 0's in, it's just on keypress.

image

Steps To Reproduce

When entering text into a text() field using a keyboard, not pasting, press the zero number key and exception fires.

crynobone commented 1 year ago

Prompts doesn't support Laravel 8. It should only be used with Laravel 10.

crynobone commented 1 year ago

Hey there,

Unfortunately we don't support this version of the library anymore. Please check out our support policy on which versions we are currently supporting. Can you please try to upgrade to the latest version and see if your problem persists? If so, please open up a new issue and we'll help you out.

Thanks!

stevenjweirstreet commented 1 year ago

Thanks for replying. We're on an upgrade path, so as soon as we're at v10, I'll be making use of this package. Thank you!