• Resolved mwijngaard

    (@mwijngaard)


    Hi,

    I’m getting the following TypeError thrown from the Simple Job Board plugin. Could you take a look?

    Thanks
    Meryn

    —–

    WordPress versie 6.0.3
    Actief thema: xx
    Huidige plugin: Simple Job Board (versie 2.10.3)
    PHP versie 8.1.11

    Foutdetails
    ===========
    Een fout van het type E_ERROR werd veroorzaakt op regelnummer 76 van het bestand xx/wp-content/plugins/simple-job-board/includes/class-simple-job-board-applicants.php. Foutmelding: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in xx/wp-content/plugins/simple-job-board/includes/class-simple-job-board-applicants.php:76
    Stack trace:
    #0 xx/wp-content/plugins/simple-job-board/includes/class-simple-job-board-applicants.php(76): in_array()
    #1 xx/wp-includes/class-wp-hook.php(307): Simple_Job_Board_Applicants->jobpost_applicants_detail_page_content()
    #2 xx/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #3 xx/wp-includes/plugin.php(476): WP_Hook->do_action()
    #4 xx/wp-admin/edit-form-advanced.php(581): do_action()
    #5 xx/wp-admin/post-new.php(75): require(‘/home/linkrec1/…’)
    #6 {main}
    thrown

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support saadali2905

    (@saadali2905)

    Hi,

    Thanks for writing to us.

    We have diagnose the issue on our end but it seems that everything is fine.
    It seems that the cause of your issue is the PHP version 8.

    Kindly review it on the earlier version of php.

    Feel free to contact us for any further assistance.

    Regards

    Thread Starter mwijngaard

    (@mwijngaard)

    I’m not sure what you’re saying there. PHP8 has been out for a very long time so I would expect the plugin code to be compatible and not throw TypeErrors.

    What’s happening is that get_post_custom_keys returns null on line 44, which is something that you take into account on line 56, but not on line 76, 78 & 106.

    Might be easier to just replace line 44 by “$keys = get_post_custom_keys($post->ID) ?? []”. Then everything would probably just work.

    Plugin Support saadali2905

    (@saadali2905)

    Hi,

    We have tried to reproduce the issue with PHP 8.0 and it is working fine.
    We have also noted down your code issue and we are testing our plugin with PHP 8.1.

    If we will find the issue with PHP 8.1, We will fix it in the new release of “Simple Job Board”.

    Also we want to clarify that according to the documentation of “Simple Job Board” it is declared that it is compatible with PHP version 7.

    Feel free to contact us for any further assistance.

    Regards

    Thread Starter mwijngaard

    (@mwijngaard)

    Have you tested the situation where get_post_custom_keys returns null? This will result in a TypeError, also in PHP 8.0. So I’m not exactly sure what you’ve tested. And your compatibility on https://www.ads-software.com/plugins/simple-job-board/ is specified as php 7 or higher, which would obviously include version 8. I’ve given you the exact solution to implement. Maybe it would be more time-efficient for both of us if you can just implement it?

    Plugin Support saadali2905

    (@saadali2905)

    Hi,

    Hope you are doing well.

    We have upgraded to PHP 8.1 and we try to reproduce error but it seems that everything is fine.

    We have attached some screenshots for your reference in the link below.
    Link : https://www.dropbox.com/scl/fo/vjip9r4y1uccqrw4raq71/h?dl=0&rlkey=83b4igv7w1e204sy19v0p6yey

    Kindly help with us to reproduce the error or where you are getting the error so that we can fix it and update it in the new release of “Simple Job Board”.

    Regards

    Plugin Support saadali2905

    (@saadali2905)

    Hi,

    We have reproduce the issue and we will fix the issue in the next release of “Simple Job Board”.

    Feel free to contact us for any further assistance.

    Regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘TypeError in class-simple-job-board-applicants.php’ is closed to new replies.