-
Notifications
You must be signed in to change notification settings - Fork 330
Closed
Labels
Milestone
Description
Describe the bug
PHP warnings for undefined constants LOGGED_IN_KEY and LOGGED_IN_SALT.
To Reproduce
Steps to reproduce the behavior:
- Install Site Kit plugin
- Enable PHP error logging
- Activate Site Kit plugin in WordPress
- Many PHP warning notices for undefined constants
Warning: Use of undefined constant LOGGED_IN_KEY - assumed 'LOGGED_IN_KEY' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 118
Warning: Use of undefined constant LOGGED_IN_KEY - assumed 'LOGGED_IN_KEY' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 119
Warning: Use of undefined constant LOGGED_IN_SALT - assumed 'LOGGED_IN_SALT' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 138
Warning: Use of undefined constant LOGGED_IN_SALT - assumed 'LOGGED_IN_SALT' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 139
Warning: Use of undefined constant LOGGED_IN_KEY - assumed 'LOGGED_IN_KEY' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 118
Warning: Use of undefined constant LOGGED_IN_KEY - assumed 'LOGGED_IN_KEY' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 119
Warning: Use of undefined constant LOGGED_IN_SALT - assumed 'LOGGED_IN_SALT' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 138
Warning: Use of undefined constant LOGGED_IN_SALT - assumed 'LOGGED_IN_SALT' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 139
Warning: Use of undefined constant LOGGED_IN_KEY - assumed 'LOGGED_IN_KEY' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 118
Warning: Use of undefined constant LOGGED_IN_KEY - assumed 'LOGGED_IN_KEY' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 119
Warning: Use of undefined constant LOGGED_IN_SALT - assumed 'LOGGED_IN_SALT' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 138
Warning: Use of undefined constant LOGGED_IN_SALT - assumed 'LOGGED_IN_SALT' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 139
Warning: Use of undefined constant LOGGED_IN_KEY - assumed 'LOGGED_IN_KEY' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 118
Warning: Use of undefined constant LOGGED_IN_KEY - assumed 'LOGGED_IN_KEY' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 119
Warning: Use of undefined constant LOGGED_IN_SALT - assumed 'LOGGED_IN_SALT' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 138
Warning: Use of undefined constant LOGGED_IN_SALT - assumed 'LOGGED_IN_SALT' (this will throw an Error in a future version of PHP) in example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php on line 139
Warning: Cannot modify header information - headers already sent by (output started at example.com/wp-content/plugins/google-site-kit/includes/Core/Storage/Data_Encryption.php:138) in example.com/wp-admin/includes/misc.php on line 1196
More information and proposed fix.
System Information (please complete the following information):
- PHP Version: 7.2.14
- OS: macOS (Mamp Pro)
- Browser Safari 12.1.1/macOS
- Plugin Version: 1.0.0.beta.1
- Device: MacBook Pro 2018
Do not alter or remove anything below. The following sections will be managed by moderators only.
Changelog entry
- Check if
LOGGED_IN_KEYandLOGGED_IN_SALTare defined before using it, to account for some environments such as local ones.