From:             gpawlicki at earthlink dot net
Operating system: Linux
PHP version:      4.2.3
PHP Bug Type:     Output Control
Bug description:  Trim()'d data not passed in $HTTP_POST_VARS

The trim() function, should of course remove whitespace surrounding a
string variable. By default the value of $current_value is "XXXXX" in this
display of a cell in a table rows of results extracted from a mySQL
query:

<TD COLSPAN=2 VALIGN=TOP ALIGN=LEFT >
  <B>
    <TEXTAREA COLS= ".$num_cols."
              ROWS= ".$num_rows." 
              NAME=\"".$i."_value\" 
              TABINDEX=\"".$tabindex."\">";
      echo "".trim($current_value)."
    </TEXTAREA>
  </B>
</TD>";

I am having two problems
1) There are two tabs being inserted after the character data (they were
not written in the database). I don't know where they are coming from, but
it seems that the trim() itself may not be working properly . . .

2) Worse, and what prompts the bug, is that on submit,  the control itself
*INTERMITTENTLY* does not appear.  In some scenarios, this happens the
second time through (e.g. going to another screen, canceling to return,
and then going back). Specifically, the printr() display shows nothing for
the control, though comparable fields  generated by iterated display of
other data from same query do appear. There is no interim processing, the
stuff is in the FORM and the underlying temporary tables, but not the
HTTP_POST_VARS. 

Under some circumstances, this was 100% reproducible. Removing the trim
statement prevented 2), but of course doesn't fix 1). . . 

Many thanks for your interest in addressing a worrisome glitch !

-- 
Edit bug report at http://bugs.php.net/?id=22419&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22419&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22419&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22419&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22419&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22419&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22419&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22419&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22419&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22419&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22419&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22419&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22419&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22419&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22419&r=gnused

Reply via email to