[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dolibarr-dev] setEventMessages instead of setEventMessage

From: Destailleur Laurent
Subject: Re: [Dolibarr-dev] setEventMessages instead of setEventMessage
Date: Mon, 22 Sep 2014 01:08:59 +0200

If you do so, you must provide a string XOR an array.
In past only string was used. More and more we try to store errors into array.
But for a transition need, we need both parameters (a lot of part of
code currently store error into string AND other errors into array).
So we need to provide both type at same time to function.

2014-09-22 1:00 GMT+02:00 Marcos García <address@hidden>:
> Hi:
> I've noticed that setEventMessage is now a deprecated function and
> setEventMessages should be used instead.
> Its signature is
>  function setEventMessages($mesg, $mesgs, $style='mesgs')
> where $mesg is for a string and $mesgs is filled when we want to attach an
> array of messages.
> My question is... why doing this and not doing a setEventMessage where the
> first param can be either an array or a string? I must say I don't really
> like functions that act differently depending on 1st or 2nd param filled.
> Regards,
> Marcos García
> address@hidden
> _______________________________________________
> Dolibarr-dev mailing list
> address@hidden

Laurent Destailleur (alias Eldy)
Social networks of my OpenSource projects:
Dolibarr Google+:
Dolibarr Facebook:
Dolibarr Twitter:
AWStats Google+:
AWStats Facebook:
AWStats Twitter:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]