Failed to add a custom field in settings I'm trying to add a global set, with a Matrix and two required fields for a product. This always works.

Now that I am in version 2.6.2791 it fails to add the fields with error:


Warning&lt;/b&gt;
: Declaration of Craft\UserSessionService::login($username, $password, $rememberMe = false) should be compatible with CWebUser::login($identity, $duration = 0) in
&lt;b&gt;/Applications/MAMP/htdocs/craft-app/2.6.2791/services/UserSessionService.php&lt;/b&gt;
on line
&lt;b&gt;17&lt;/b&gt;
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Warning&lt;/b&gt;
: Declaration of Craft\UserSessionService::afterLogin() should be compatible with CWebUser::afterLogin($fromCookie) in
&lt;b&gt;/Applications/MAMP/htdocs/craft-app/2.6.2791/services/UserSessionService.php&lt;/b&gt;
on line
&lt;b&gt;17&lt;/b&gt;
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Warning&lt;/b&gt;
: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/craft-app/2.6.2791/services/UserSessionService.php:17) in
&lt;b&gt;/Applications/MAMP/htdocs/craft-app/2.6.2791/framework/web/CHttpRequest.php&lt;/b&gt;
on line
&lt;b&gt;1519&lt;/b&gt;
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Warning&lt;/b&gt;
: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/craft-app/2.6.2791/services/UserSessionService.php:17) in
&lt;b&gt;/Applications/MAMP/htdocs/craft-app/2.6.2791/framework/web/CHttpRequest.php&lt;/b&gt;
on line
&lt;b&gt;1507&lt;/b&gt;


The CSRF token could not be validated.

Any ideas or fixes would be great!
You're getting that error message because your PHP environment is displaying PHP Strict mode error messages.

By default, Craft will explicitly disable those if devMode is enabled (error_reporting(E_ALL &amp; ~E_STRICT);) and disable all messages if devMode is disabled (error_reporting(0);).

So my guess is you've either got a plugin that's messing with error_reporting and re-enabling strict messages or you've doing it from your public index.php or craft/config files.

Note that in the upcoming Craft 3, we've made it so that you can run Craft with PHP strict error messaging enabled.