Skip to content
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

Admin-UI: Using the label 'True' or 'False' in a select (dropdown) displays incorrect labels. #5093

Closed
CaMer0n opened this issue Nov 1, 2023 · 0 comments
Labels
type: bug A problem that should not be happening
Milestone

Comments

@CaMer0n
Copy link
Member

CaMer0n commented Nov 1, 2023

Bug Description

A clear and concise description of what the bug is.

How to Reproduce

$fields['example'] =  array(
    'title'=> 'My title', 
    'type'=>'dropdown', 
    'data' => 'str', ' 
    'writeParms' => ['optArray'=>['true'=>'True', 'false'=>'False', 'other'=>'Other']]
);

Actual Behavior

<option value='true'>1</option>
<option value='false'></option>
<option value='other'>Other</option>

Expected Behavior

<option value='true'>True</option>
<option value='false'>False</option>
<option value='other'>Other</option>

Cause

True and False are constants in PHP, and the option() method checks for constants using defset() on labels before rendering.

@CaMer0n CaMer0n added the type: bug A problem that should not be happening label Nov 1, 2023
@CaMer0n CaMer0n added this to the e107 2.3.3 milestone Nov 1, 2023
@CaMer0n CaMer0n changed the title Admin-UI: Using the label 'True' or 'False' in a select (dropdown) displays incorrect label. Admin-UI: Using the label 'True' or 'False' in a select (dropdown) displays incorrect labels. Nov 1, 2023
@CaMer0n CaMer0n closed this as completed in faa2f8a Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

1 participant