Support » Plugin: WP Job Manager » Undefined index: post_type

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter piersb

    (@piersb)

    The particular line of code is

    if ( ‘edit.php’ !== $pagenow || ‘job_listing’ !== $wp->query_vars[‘post_type’] )

    The other if statements in the method test against $_GET, which we can see is set in the URL. Would changing the code to

    if ( ‘edit.php’ !== $pagenow || ‘job_listing’ !== $_GET[‘post_type’] )

    solve the problem?

    (alternatively using isset($wp->query_vars[‘post_type’]) to test for it would presumably also work, dependent on which is the better case to return from…)

    Plugin Contributor Jen H. (a11n)

    (@jenhooks)

    Hey @piersb,

    There will be a fix for this in the 1.31.1 release. We do not have an ETA at this time, though.

    Cheers.

    Thread Starter piersb

    (@piersb)

    Ta!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Undefined index: post_type’ is closed to new replies.