Matrix
Matrix

Reputation: 53

Fatal error: Namespace declaration statement has to be the very first statement in the script in /home/central1/public_html/wp-content

How to remove:- Fatal error:

Namespace declaration statement has to be the very first statement in the script in /home/central1/public_html/wp-content/plugins/wcp-openweather/classes/Settings.class.php on line 2

Upvotes: 1

Views: 3496

Answers (2)

Mahfuzul Alam
Mahfuzul Alam

Reputation: 3157

In your Settings.class.php write your namespace declaration at the top, I mean just after starting <?php tag. It would solved that.

Upvotes: 2

Mayank Pandeyz
Mayank Pandeyz

Reputation: 26278

Sometimes this issue come because of space in php start tag of controller facing same issue just removed whitespace in

<?php 
namespace App\Http\Controllers\Auth;

removing the space resolved my error.

Upvotes: 3

Related Questions