This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

server error

  • Creator
    Topic
  • #10409

    Hi. I have a server error appearing:
    [:error] [pid 296:tid 992] [client 82.152.152.138:60572] PHP Warning: strpos(): Offset not contained in string in C:\\Apache24\\htdocs\\wp-content\\themes\\barelycorporate\\framework\\frontend\\functions\\helpers.php on line 191

    Code related to this error is:
    /**
    * Remove trailing space from string.
    * @since 2.0.0
    * @param string $string Current string to check
    * @param string $char Character to remove from end of string if exists
    * @return string $string String w/out trailing space, if it had one
    */
    if( ! function_exists( ‘themeblvd_remove_trailing_char’ ) ) {
    function themeblvd_remove_trailing_char( $string, $char = ‘ ‘ ) {
    $offset = strlen( $string ) – 1;
    $trailing_char = strpos( $string, $char, $offset );
    if( $trailing_char )
    $string = substr( $string, 0, -1 );
    return $string;
    }
    }

    Line 191 is: $trailing_char = strpos( $string, $char, $offset );

    Do you have a solution to fix this server error. Please let me know.

    Aaron

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #10415
    Jason Bobich
    Keymaster

    This is just a harmless PHP warning. It’s really nothing to worry about. But do you have a specific context in which this warning is being generated? This is a common function that gets used in many places.

Viewing 1 replies (of 1 total)
  • The forum ‘Barely Corporate Responsive WordPress Theme’ is closed to new topics and replies.