Ticket #495 (closed Bug: fixed)

Opened 4 months ago

Last modified 1 month ago

Bug in Forge -> Form_Input -> rule_length

Reported by: damike Assigned to: Shadowhand
Priority: critical Milestone: 2.1.2
Component: Modules:Forge Version: 2.1 Release
Keywords: Cc:
SVN Revision (if applicable):

Description

There is a bug in rule_length. It uses strlen - that returns a wrong length if you use umlauts For example: üögh returns 6

Using mb_strlen or

// Get the length, return if zero
		if (($length = count(preg_split("//u", $this->value, -1, PREG_SPLIT_NO_EMPTY))) === 0)
			return;

works

Change History

03/16/08 11:49:31 changed by damike

System core function utf8::strlen does it also well

05/28/08 17:50:18 changed by Shadowhand

  • status changed from new to assigned.

05/28/08 17:50:36 changed by Shadowhand

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in r2703.