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

    Hi, I am consistently getting a PHP warning containing the following:

    PHP Warning: fread(): Length parameter must be greater than 0 in /public_html/halofinancial.com/wp-content/themes/enfold/framework/php/function-set-avia-backend.php on line 1025

    This appears to be related to the following

    if( ! function_exists( 'avia_backend_create_file' ) )
    {
    	/**
    	 * Creates a file for the theme framework and optionally verifies content
    	 * 
    	 * @param string $file
    	 * @param string $content
    	 * @param boolean $verifycontent
    	 * @return boolean
    	 */
    	function avia_backend_create_file( $file, $content = '', $verifycontent = true )
    	{
    	    $handle = @fopen( $file, 'w' );
    	    if( $handle )
    	    {
    	        $created = fwrite( $handle, $content );
    	        fclose( $handle );
    
    	        if( $verifycontent === true )
    	        {
    	            $handle = fopen( $file, 'r' );
    	            $filecontent = fread( $handle, filesize( $file ) );
    	            $created = ( $filecontent == $content ) ? true : false;
    	            fclose( $handle );
    	        }
    	    }
    	    else
    	    {
    	        $created  = false;
    	    }
    
    	    if( $created !== false ) 
    		{
    			$created = true;
    		}
    		
    	    return $created;
    	}
    }

    Running Enfold version 4.7.6.1 PHP version: 7.2.29

    #1236007

    Hey sfoster123,

    Can you try to upgrade PHP version to 7.3? and check if the same error still persists.

    Best regards,
    Nikko

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.