#1 February 9, 2015 11:13am

jmason03
Member
Registered: January 9, 2014
Posts: 123

Arrays in Site Integrity Check

I think there's a small bug when running the site integrity check and the module being checked has an array as one of the fields returned by the get(). If the field is an array, the two ifs inside the foreach use substr which throws a warning when it's not given a string and it prints that to the screen for each entry that it checks. Everything still works, it just makes for a less than aesthetic results page. I just added an empty if at the beginning to do nothing if the current field was an array, but I suppose the best solution would be to iterate over each item in the array and check it with same substr checks.

Offline

#2 February 11, 2015 2:20pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Arrays in Site Integrity Check

Good catch! Hopefully I'll have this fixed in the 4.1-devel branch in the next few days (to loop through arrays).

Offline

#3 February 13, 2015 12:06pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Arrays in Site Integrity Check

Fix should be available here:
https://github.com/bigtreecms/BigTree-C … 34af854993

Ended up realizing that we didn't need to loop through arrays (at least at the moment) as it only checked text fields anyway -- it was just choking on text fields that had sub types that output arrays (like phone, name, etc).

I'll plan for a future release to walk through callout fields (and matrix fields in 4.2).

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.