• Resolved rochb

    (@rochb)


    When I try to access the dashboard, I am receiving the following errors:

    Warning: A non-numeric value encountered in /homepages/25/d736126010/htdocs/clickandbuilds/Direct4Workgear/wp-includes/functions.php on line 74

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/25/d736126010/htdocs/clickandbuilds/Direct4Workgear/wp-includes/functions.php:74) in /homepages/25/d736126010/htdocs/clickandbuilds/Direct4Workgear/wp-includes/pluggable.php on line 1296

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/25/d736126010/htdocs/clickandbuilds/Direct4Workgear/wp-includes/functions.php:74) in /homepages/25/d736126010/htdocs/clickandbuilds/Direct4Workgear/wp-includes/pluggable.php on line 1299

    I cannot access the dashboard at all and the site is being redirected to some spammy thing. I can access via FTP, I’ve disabled plugins, nothing happened, disabled themes, again nothing.
    So I went into functions.php to line 74, and this is what I have…

    function current_time( $type, $gmt = 0 ) {
    	// Don't use non-GMT timestamp, unless you know the difference and really need to.
    	if ( 'timestamp' === $type || 'U' === $type ) {
    		return $gmt ? time() : time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
    	}
    
    	if ( 'mysql' === $type ) {
    		$type = 'Y-m-d H:i:s';
    	}
    
    	$timezone = $gmt ? new DateTimeZone( 'UTC' ) : wp_timezone();
    	$datetime = new DateTime( 'now', $timezone );
    
    	return $datetime->format( $type );
    }

    Can anybody help me set the timezone so that I can get passed this and also does anyone have suggestions for the dodgy redirect?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Rochb,
    I can see your status is resolved but cannot find an answer.
    Have you managed to solve your issue ?
    It seems I have exactly the same too.
    Thank you

    Hey Rochb,
    Have you managed to solve your issue ?
    It seems I have exactly the same too.
    Thank you

    Thread Starter rochb

    (@rochb)

    If your issue is just the errors and you’re not getting a redirect, I believe if you remove WooCommerce Admin/update the database this causes some files to go missing and causes these errors. I was helped by a very nice guy called Samuel who you can find at WP Coworker he was able to fix the files issue.

    However if you’re experiencing a re-direct issue like I was, I would look at getting a professional to clean the hack and then install WordFence which I am currently using.

    Hope this helps you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Warning: A non-numeric value encountered’ is closed to new replies.