Support

Account

Home Forums Backend Issues (wp-admin) Notice: Undefined variable: parent in custom field type

Solved

Notice: Undefined variable: parent in custom field type

  • Hi there, as the title states, I get the following warning from my custom field type code:

    
    Notice:  Undefined variable: parent in ...acf/string-pair-acf4.php on line 41
    

    The line causing it is this (taken from your GitHub example):

    
    // do not delete!
    parent::__construct($parent);
    

    EDIT: I am still using an old approach, including the file directly from my theme.

  • Sorry, question solved. I just had to remove the $parent variable, of course *facepalm*

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

The topic ‘Notice: Undefined variable: parent in custom field type’ is closed to new replies.