Using Dropdate 2.2.0 and EE 2.5.1

Outputting the field gives me this:

A PHP Error was encountered

Severity: 4096

Message: Argument 2 passed to Dropdate_ft::replace_tag() must be of the type array, boolean given, called in     /Users/Chad/Repositories/hhc/site/system/expressionengine/libraries/channel_entries_parser/components/Custom_field    .php on line 125 and defined

Filename: dropdate/ft.dropdate.php

Line Number: 338

A PHP Error was encountered

Severity: Warning

Message: array_merge(): Argument #2 is not an array

Filename: dropdate/ft.dropdate.php

Line Number: 357

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at     /Users/Chad/Repositories/hhc/site/system/codeigniter/system/core/Exceptions.php:170)

Filename: core/Common.php

Line Number: 412

Can someone direct me to a fix for this? I couldn't see anything obvious in the code. Line 338 is

public function replace_tag($field_data = '', Array $params = array(), $tagdata = '')

and the param in question is Array $params = array()


That add-on is now discontinued, I'm using v3 successfully though - you can find it in the GitHub account under the Develop branch.

There's a mention of array_merge in the errors (on my version of DropDate it's line 482 in _build_settings method), this tries to intersect array keys regarding settings. Try going to the settings for the fieldtype in EE backend to see if that updates anything, I get this message when I go there:

We lured you here under false pretences.

There are no global settings, but ExpressionEngine won’t update a fieldtype unless you visit its global settings page. Obviously.

Just click the “Submit” button, and get back to your nice life where you don’t have to deal with this nonsense for a living.

...So clearly it's done something...!

Otherwise, (on my version) display_var_tag calls replace_tag, so you could add a check on that:

public function display_var_tag($var_data, Array $params, $tagdata)
    if (!is_array($params)) {
        return $this->replace_tag($var_data);
    } else 
        return $this->replace_tag($var_data, $params);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.