Things I've tried, and something that worked.

- tried specifying a literal string value, and once again 
$_SESSION['search'][$search_request] would only contain the first character.

- tried modifying through $GLOBALS, but it still only took first character.

- added another variable $some_var and it took the full filter.

- added $_SESSION['search']['some_var'], but it only took the first 
character.

- added $_SESSION['some_var'], and it took the full filter.

This looks like a bug in PHP, but I did manage to get the desired result 
with the following:

//  $_SESSION['search'][$search_request] = $CONTACTS->get_search_set();
   $search_set[$search_request] = $CONTACTS->get_search_set();
   $_SESSION['search'] = $search_set;

This of course would be a problem if $_SESSION['search'] contained 
anything else.

Kyle


Terminal Addict wrote:
> I am following up on a submitted bug and was hoping someone else could 
> confirm the behaviour I'm seeing.
> 
> I have added the following to program/steps/addressbook/search.inc to 
> demonstrate the problem (note that first line below should be the 
> existing line 34).
> 
>    $_SESSION['search'][$search_request] = $CONTACTS->get_search_set();
> $kfh = fopen("logs/filter", "a");
> fwrite($kfh, "Filter at search.inc (in SESSION)\n ");
> fwrite($kfh, $_SESSION['search'][$search_request]);
> fwrite($kfh, "\n");
> fwrite($kfh, "Filter at search.inc (in CONTACTS)\n ");
> fwrite($kfh, $CONTACTS->get_search_set());
> fwrite($kfh, "\n");
> fclose($kfh);
> 
> What I am seeing after the first search is that 
> $_SESSION['search'][$search_request] does indeed equal 
> $CONTACTS->get_search_set() (which is a full valid filter). However, for 
> every subsequent search, $_SESSION['search'][$search_request] ends up 
> being "(", even though $CONTACTS->get_search_set() does contain the full 
> valid filter.
> 
> Basically, it seems that the assignment on line 34 works fine for the 
> first search, but fails after that. It can be reset by logging out and 
> in again.
> 
> Kyle
> _______________________________________________
> List info: http://lists.roundcube.net/dev/

_______________________________________________
List info: http://lists.roundcube.net/dev/

Reply via email to