I'm getting warnings in my PHP log when using PHP 7.2:
[30-Nov-2017 23:57:01 Europe/Berlin] PHP Warning: Use of undefined constant IN_serendipity_admin - assumed 'IN_serendipity_admin' (this will throw an Error in a future version of PHP) in [path]/include/functions_smarty.inc.php on line 1005
[30-Nov-2017 23:57:01 Europe/Berlin] PHP Warning: Use of undefined constant IN_serendipity_admin - assumed 'IN_serendipity_admin' (this will throw an Error in a future version of PHP) in [path]/include/functions_smarty.inc.php on line 1022
I'm not entirely clear what that means, it seems to think the single quotes are part of the constant name.
PHP Warning: Use of undefined constant IN_serendipity_admin
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: PHP Warning: Use of undefined constant IN_serendipity_a
Thanks & sorry for late response. A "defined('IN_serendipity_admin')" check is needed for forward compatibility. I just committed it to our 2.1 branch and master.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: PHP Warning: Use of undefined constant IN_serendipity_a
FYI, if I switch to PHP 7.2.1 I get another warning in serendipity_config.inc.php. PHP 7.1.x is working fine without warnings.
Code: Select all
Use of undefined constant CHARSET_NATIVE - assumed 'CHARSET_NATIVE' (this will throw an Error in a future version of PHP) in /home/www/blog/serendipity_config.inc.php on line 183
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: PHP Warning: Use of undefined constant IN_serendipity_a
Hey,
many thanks for reporting. This was another instance of using an uninitialized constant, I've fixed this in our git 2.1 & master.
Regards,
Garvin
many thanks for reporting. This was another instance of using an uninitialized constant, I've fixed this in our git 2.1 & master.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: PHP Warning: Use of undefined constant IN_serendipity_a
More such warnings as part of the "podcast" plugin:
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_QTEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_QTEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1215
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_WMEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_WMEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1216
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_MFEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_MFEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1217
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_AUEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_AUEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1218
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_XSPFEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_XSPFEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1219
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_QTEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_QTEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1215
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_WMEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_WMEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1216
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_MFEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_MFEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1217
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_AUEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_AUEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1218
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_XSPFEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_XSPFEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1219
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: PHP Warning: Use of undefined constant IN_serendipity_a
Thanks, fixed!
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: PHP Warning: Use of undefined constant IN_serendipity_admin
One more such warning in the installer code:
Warning: Use of undefined constant S9Y_DB_INCLUDED - assumed 'S9Y_DB_INCLUDED' (this will throw an Error in a future version of PHP) in /[path]/include/functions_installer.inc.php on line 650
Warning: Use of undefined constant S9Y_DB_INCLUDED - assumed 'S9Y_DB_INCLUDED' (this will throw an Error in a future version of PHP) in /[path]/include/functions_installer.inc.php on line 650
Re: PHP Warning: Use of undefined constant IN_serendipity_a
Hi Garvin,
I get the same problem, but I'm not sure I get what I have to do to fix it. Could you explain that? Do I have to update/install something?
Thanks,
Stefan
Re: PHP Warning: Use of undefined constant IN_serendipity_a
Which one?
It's fixed in the git repository, but not yet released.
You can
- look up the fixes in our code repository and adopt them in your version of s9y
- check out the version from git and update to that
- wait for the release
In general, s9y is not yet ready for prime time on PHP 7.2; you should run it with 7.1 or even 7.0, if possible.