Skip to content

Error When Saving Manager User in EVO 1.4.17 #2092

@nikokyritsis

Description

@nikokyritsis

I'm seeing a SQL error when editing a Manager User's password and trying to save, with a wrong type for the dob field. The issue stems from the DOB field, which displays "-" as the field value if none is set (dob field set to 0 in the db). It looks like the issue started after the PHP8 fix commit, which changed the field value:

<?php echo($userdata['dob'] ? $modx->toDateFormat($userdata['dob'], 'dateOnly') : ""); ?>

to

<?php echo(isset($userdata['dob']) ? $modx->toDateFormat($userdata['dob'], 'dateOnly') : ""); ?>

Since the default behavior has the dob set to 0, isset is returning true and the dateOnly mode causes the value to return '-'. A potential fix would be to include an OR check for the dob being set to 0 in mutate_user.dynamic.php or to change the behavior of the toDateFormat function in document.parser.class.inc.php to return an empty string instead of a dash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions