[Tickets #14131] Re: monthdayyear object not logged in history

noreply at bugs.horde.org noreply at bugs.horde.org
Thu Oct 8 08:59:37 UTC 2015


BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE  
E-MAIL-ADRESSE WERDEN NICHT GELESEN.

Ticket-URL: https://bugs.horde.org/ticket/14131
------------------------------------------------------------------------------
  Ticket           | 14131
  Aktualisiert Von | birnbacs at gmail.com <birnbacs at gmail.com>
  Zusammenfassung  | monthdayyear object not logged in history
  Warteschlange    | Horde Framework Packages
  Typ              | Bug
  Status           | Unconfirmed
  Priorität        | 1. Low
  Milestone        |
  Patch            | 1
  Zuständige       |
------------------------------------------------------------------------------


birnbacs at gmail.com (2015-10-08 08:54) hat geschrieben:

This ticket is related to ticket #14130.

After fixing the monthdayyear object so that it would be usable in  
whups I noticed that its history does not get displayed properly, the  
amended value never showed up.

In pear module Form the class of the monthdayyear object is defined in  
file Form/Type.php. Its init() method is defined in line 2851:
class Horde_Form_Type_monthdayyear extends Horde_Form_Type  
{$start_year = '', $end_year = '', $picker = true,
                    $format_in = null, $format_out = '%x')

The init() method accepts 5 arguments, the last of which is  
$format_out and has a default value of '%x'. In line 2865 the  
protected variable $this->_format_out is unconditionally set to  
$format_out. However, at least in the context of a user defined  
attribute in whups, the init() method is called with $format_out =  
null, which causes incorrect rendering of the variable saved in the  
history (i.e. no rendering at all).

I fixed this by checking that $format_out is not null before  
overwriting the protected variable:

         if ($format_out != null) { // line 2865: don't overwrite the  
default value with null
           $this->_format_out = $format_out;





More information about the bugs mailing list