Skip to content

v1.2.7

Latest

Choose a tag to compare

@dbltoe dbltoe released this 18 Nov 15:24

Refuses an over-long entry with a clear message instead of letting the database cut it short. There are no database changes from v1.2.6, and nothing to reconfigure after upgrading.

Fixed

  • An over-long entry no longer disappears into a truncated value. First name, last name, e-mail address and telephone are now checked against the width of the column that will hold them, before the customer is saved. A value that is too long comes back as, for example, "First Name must be 32 characters or fewer." Until now the only limit was the form's maxlength attribute, which applies in the browser and nowhere else: anything posted straight to the page went through, and MySQL either shortened the value silently or refused the whole insert with no explanation. First and last name are stored in two tables, so each is checked against both and reported at whichever is shorter, the same way Zen Cart's own create-account page does it.

Tested on Zen Cart 2.0.1, 2.2.2 and 3.0.0-dev, on PHP 8.0 through 8.5, by driving the real admin form: an over-long name is refused and no customer is created, a valid one still saves, and the boundary is exact — a value the length of the column is accepted, one character more is not.

The attached admin_add_customer-1.2.7.zip is the same package as the myzencartzone.com download. See README.md for installation, and CHANGELOG.md for the full version history.