From: Roland Haeder Date: Fri, 6 Mar 2015 23:34:34 +0000 (+0100) Subject: Merge branch 'nightly' of gitorious.org:social/mainline into nightly X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=93cea712eff597199fd596e9752d2e532e0e6f24;p=quix0rs-gnu-social.git Merge branch 'nightly' of gitorious.org:social/mainline into nightly Better use a clear type-hint and array() as default value then you can avoid the additional is_null() call. Conflicts: lib/noticeform.php Signed-off-by: Roland Haeder --- 93cea712eff597199fd596e9752d2e532e0e6f24 diff --cc lib/noticeform.php index 9fc612a775,4b3801b630..a92b431dd6 --- a/lib/noticeform.php +++ b/lib/noticeform.php @@@ -97,16 -97,18 +97,14 @@@ class NoticeForm extends For * 'location_id' ID of location * 'location_ns' Namespace of location */ - function __construct($action, $options=null) + function __construct(Action $action, array $options = array()) { - // XXX: ??? Is this to keep notice forms distinct? - // Do we have to worry about sub-second race conditions? - // XXX: Needs to be above the parent::__construct() call...? + parent::__construct($action); + // When creating a notice form we don't want to collide with + // possibly existing HTML elements, as naming conventions are similar. $this->id_suffix = rand(); - parent::__construct($action); - if (is_null($options)) { - $options = array(); - } -- $this->actionName = $action->trimmed('action'); $prefill = array('content', 'inreplyto', 'lat',