Home Forums Add-ons Repeater Field Leaving fields blank causes notices in wp-includes files


Leaving fields blank causes notices in wp-includes files

  • Hello.

    This site is using a combination of advanced fields, relationships and repeaters seem to be causing the problems.

    Two problems we’re having.

    On the presenters page there is a presenter ‘Scott Danielson’ who does not have a value in the excerpt field of his profile. (This is the regular WP excerpt field.)
    Expecting to see a blank space where his excerpt would go, instead I see a notice.
    If I give him an excerpt, the next presenter in the list who doesn’t have an excerpt will have this same notice in it’s place.

    Notice: Object of class WP_Post could not be converted to int in /var/www/vhosts/ on line 251

    The other issue is on the presenter profile pages.
    In the ‘gallery’ or ‘articles written’ sections, when no value is entered in either field the following notice is displayed.

    Notice: Uninitialized string offset: 0 in /var/www/vhosts/ on line 3739

    Not sure where to begin debugging this. Are there any known solutions? Any help is greatly appreciated. Thank you.

  • Hello, does anyone have any insight on this? Still an issue we’re hoping to solve soon. Thank you.

  • Not sure if this is the same issue you experienced but I was using a Relationship field, and when it was blank I was getting the “Notice: Uninitialized string offset: 0” message.

    I changed the name of the variable “$posts” to something else, and now it all seems to work correctly.

  • I can confirm the same error message appearing with a Relationship field, and changing the variable to something other than $posts does fix the issue.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Leaving fields blank causes notices in wp-includes files’ is closed to new replies.