Open Jimmi08 opened 6 years ago
Prefs are correct:
$this->prefs['link_open_all']['writeParms']['optArray'] = array(
'5'=>LCLAN_OPT_42,
'0'=>LCLAN_ITEM_17,
'1'=>LCLAN_ITEM_18,
'4'=>LCLAN_ITEM_19
);
I don't see any diff:
$this->fields['link_open']['writeParms']['optArray'] = array(
'0'=>LCLAN_ITEM_17,
'1'=>LCLAN_ITEM_18,
'4'=>LCLAN_ITEM_19
);
Confirmed, problem in 7.1 too, changing to 7.0 solved issue.
So it is a php code issue. I haven't got yet a test environment set for 7.x, since i currently still need 5.4 support....
But it's currently working with PHP 5.4.45:
Thanks
I have it worked with 7.0, it is not related to this plugin, it's core thing.
That was my second choice to investigate.....
Thanks
@Jimmi08 @rica-carv Are you sure with the the ['optArray'] key?
I know this only without...?!?
So i would write it like this:
$this->fields['link_open']['writeParms'] = array( '0'=>LCLAN_ITEM_17, '1'=>LCLAN_ITEM_18, '4'=>LCLAN_ITEM_19 );
@SimSync I am sure it's correct way. There was issue - your solution didn't work and this was fix by CaMeRon. And it works in PHP 5.4, 5.5, 5.6, 7.0, so it's has something with php compability, if it doesn't work in 7.1 and 7.2
And I just look at plugin that CaMeRon helped me with:
$this->fields['element_type_id']['writeParms']['optArray'] = $categories; // in case you want to add other parms?
there is ['optArray'] too.
@Jimmi08 Yes, you are right. Just checked in the source.
How is the "writeParms" initialized in the field definition? This way: 'writeParms'=>array()
or 'writeParms'=>""
or something different?
Try initializing writeParms with array().
I am not able to add link
Only diff between working version is using php 7.2