Warning: strncmp() expects parameter 1 to be string, array given

Posted · Add Comment

Scheduler Forums BirchPress Scheduler Warning: strncmp() expects parameter 1 to be string, array given

This topic contains 1 reply, has 1 voice, and was last updated by  Mobile Tire Exchange 7 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #29219

    Hello,

    Looks like a great plugin but I’m having some issues. When adding a new appointment I’m getting the following warnings:

    Warning: strncmp() expects parameter 1 to be string, array given in /home/www/dev.mobiletirexchange.com/docs/wp-content/plugins/birchschedule/framework/includes/birchpress/util/package.php on line 100

    Warning: strncmp() expects parameter 1 to be string, array given in /home/www/dev.mobiletirexchange.com/docs/wp-content/plugins/birchschedule/framework/includes/birchpress/util/package.php on line 100

    When I look at the code in that file I see:

    $ns->starts_with = function ( $haystack, $needle ) {
       return !strncmp( $haystack, $needle, strlen( $needle ) );
    };
    

    According to PHP manual the function “strncmp” only compares strings and not arrays, hence the warnings.

    Additionally the predefined Address field does not seem to save data it always returns blank.

    Furthermore when editing Client Info while Editing an Appointment I also get the following warnings:

    Warning: strncmp() expects parameter 1 to be string, array given in /home/www/dev.mobiletirexchange.com/docs/wp-content/plugins/birchschedule/framework/includes/birchpress/util/package.php on line 100

    Warning: strncmp() expects parameter 1 to be string, array given in /home/www/dev.mobiletirexchange.com/docs/wp-content/plugins/birchschedule/framework/includes/birchpress/util/package.php on line 100

    Warning: Illegal offset type in isset or empty in /home/www/dev.mobiletirexchange.com/docs/wp-includes/meta.php on line 505

    Warning: Illegal offset type in /home/www/dev.mobiletirexchange.com/docs/wp-content/plugins/birchschedule/framework/includes/birchpress/db/package.php on line 89

    Warning: Illegal offset type in isset or empty in /home/www/dev.mobiletirexchange.com/docs/wp-content/plugins/birchschedule/modules/fbuilder/package.php on line 421

    The “Illegal offset type” seems to be why the address isn’t saving here. Instead of passing a string for a key to the array it is passing an array as a key to the array. At least that’s the case in “/home/www/dev.mobiletirexchange.com/docs/wp-content/plugins/birchschedule/framework/includes/birchpress/db/package.php” line 89.

    Setup information:

    • It is the only active plugin.
    • Current Theme: Twenty Seventeen (Version: 1.2)
    • WordPress Version: 4.7.4
    • PHP version: 5.4.45
    • I’ve also tried in via WAMP with PHP version 5.5.12 although I don’t think the PHP version is relative to the issue in this case.

    Any help appreciated, thanks!

    #29221

    And the plugin version is: 2.9.39.BP

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

The forum ‘BirchPress Scheduler’ is closed to new topics and replies.

Comments are closed.