• Resolved hakuna4matata

    (@hakuna4matata)


    I got a PHP notice while debugging a Forminator form:

    class ForminatorHooksDebugger {

    private $entry_id = 'N/A';

    public function __construct() {
    add_filter( 'forminator_replace_form_data', array( $this, 'replace_form_data' ), 10, 3 );
    }

    public function replace_form_data( $content, $data, $original_content) {
    error_log( "Hook: forminator_form_replace_form_data - Form ID: " . $data['form_id'] );
    $this->log_current_entry( $data['form_id'], "replace_form_data", $data);

    }

    private function log_current_entry( $form_id, $hook_name, $entry = null ) {
    if (is_null($entry)) {
    error_log( "Current Entry (within " . $hook_name . "): Entry is not available at this point." );
    return;
    }

    if (is_object($entry) or is_array($entry)) {
    error_log( "Current Entry (within " . $hook_name . "): " . print_r( $entry, true ) );
    } else {
    error_log("Current Entry (within " . $hook_name . "): Entry format is unknown.");
    error_log(print_r($entry, true));
    return;
    }

    }
    }

    new ForminatorHooksDebugger();

    The Notice is:

    [06-Feb-2025 07:52:59 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /public_html/wp-content/plugins/forminator/library/helpers/helper-fields.php on line 1138

    There are a multi-upload field and some hidden fields in the form.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @hakuna4matata,

    We have fixes in the upcoming version ie 1.40 for similar which should be fixed, however, I would like to confirm if the current notice is due to a different aspect or not.

    Possible to provide us with the form export so that we could have a better idea? Please check the following doc on how to export a form:

    https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export

    If you are concerned about any sensitive information in the form, then you can duplicate your form, remove any sensitive information, and then export it.

    You can share the export file via Google Drive, Dropbox or any cloud service in the next reply.

    Looking forward to your response.

    Best Regards,

    Nithin

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @hakuna4matata,

    Since we haven’t heard from you for a while. I’ll mark this thread as resolved for now. Please feel free to re-open this thread if you need any further assistance.

    Best Regards,

    Nithin

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

The topic ‘PHP Deprecated: strpos()’ is closed to new replies.