t1mwillis / GWCode-EE3-EE4-EE5

A fork of the GWCode module to support EE3+ as well as PHP7
14 stars 6 forks source link

custom_fields="yes" cause PHP 7 error #1

Open ngoncom opened 5 years ago

ngoncom commented 5 years ago

Hi,

I want to get category's custom field with this code:

{exp:gwcode_categories cat_id="1" style="linear" custom_fields="yes"} {cat_meta_keywords} {/exp:gwcode_categories}

But it causing PHP error, thank!

t1mwillis commented 5 years ago

@ngoncom can you give me some more information about the PHP error? Perhaps a screenshot? Thanks.

ngoncom commented 5 years ago

Here it is:

I used this code with EE 5.2.3 and PHP 7.1

{exp:gwcode_categories group_id="1" cat_id="{segment_1_category_id}" custom_fields="yes" style="linear"} {prod_cat_keyword} {/exp:gwcode_categories}

2019-07-08_103901 2019-07-08_103928

Thank!

t1mwillis commented 5 years ago

@ngoncom can you take a look at the PR and see if it solves your issue? If so, I'll merge it into master.

Thanks!