Development

#4230 ([PATCH] sfBrowser doesn't send checked checkedboxes without value attributes correctly)

You must first sign up to be able to contribute.

Ticket #4230 (closed defect: fixed)

Opened 5 months ago

Last modified 5 months ago

[PATCH] sfBrowser doesn't send checked checkedboxes without value attributes correctly

Reported by: bschussek Assigned to: fabien
Priority: minor Milestone: 1.0.18
Component: other Version: 1.0.17
Keywords: Cc:
Qualification: Unreviewed

Description

sfBrowser always sends the value attribute if a checkbox is checked upon calling click(). If the value attribute is not defined, it sends an empty string though which makes the next page believe the checkbox has not been set.

An easy fix for it is to check whether the value of the element exists/is empty and send the string '1' in this case (as is done by default by most browsers, I think).

Change sfBrowser, line 569

          $value = $element->getAttribute('value');

to

          $value = strlen($element->getAttribute('value')) === 0
          		? '1'
          		: $element->getAttribute('value');

to fix this problem

Change History

08/21/08 17:32:43 changed by fabien

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

(In [11020]) [1.1, 1.2] fixed sfBrowser doesn't send checked checkedboxes without value attributes correctly (closes #4230)

08/21/08 17:34:34 changed by fabien

(In [11021]) [1.0] fixed sfBrowser doesn't send checked checkedboxes without value attributes correctly (closes #4230)

08/21/08 17:34:53 changed by fabien

  • version changed from 1.1.0 RC2 to 1.0.17.
  • milestone set to 1.0.18.