1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-16 20:28:28 +01:00
Nick Liu b3cc2cf117
Fixed time.bb fatal error in PHP 8.0:
```
[Sat Nov 28 07:42:08.146694 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Non-static method e_date::convert_date() cannot be called statically in ~/public_html/e107_handlers/bbcode_handler.php(390) : eval()'d code:6
[Sat Nov 28 07:42:08.146832 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: Stack trace:
[Sat Nov 28 07:42:08.146841 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #0 ~/public_html/e107_handlers/bbcode_handler.php(390): eval()
[Sat Nov 28 07:42:08.146848 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #1 ~/public_html/e107_handlers/bbcode_handler.php(202): e_bbcode->proc_bbcode()
[Sat Nov 28 07:42:08.146853 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #2 ~/public_html/e107_handlers/e_parse_class.php(1919): e_bbcode->parseBBCodes()
[Sat Nov 28 07:42:08.146859 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #3 ~/public_html/e107_core/shortcodes/batch/comment_shortcodes.php(350): e_parse->toHTML()
[Sat Nov 28 07:42:08.146882 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #4 ~/public_html/e107_handlers/shortcode_handler.php(1119): comment_shortcodes->sc_comment()
[Sat Nov 28 07:42:08.146888 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #5 [internal function]: e_parse_shortcode->doCode()
[Sat Nov 28 07:42:08.146908 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #6 ~/public_html/e107_handlers/shortcode_handler.php(986): preg_replace_callback()
[Sat Nov 28 07:42:08.146914 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #7 ~/public_html/e107_handlers/e_parse_class.php(883): e_parse_shortcode->parseCodes()
[Sat Nov 28 07:42:08.146920 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #8 ~/public_html/e107_handlers/comment_class.php(534): e_parse->parseTemplate()
[Sat Nov 28 07:42:08.146926 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #9 ~/public_html/e107_handlers/comment_class.php(1301): comment->render_comment()
[Sat Nov 28 07:42:08.146931 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #10 ~/public_html/e107_handlers/comment_class.php(1125): comment->getComments()
[Sat Nov 28 07:42:08.146938 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #11 ~/public_html/e107_plugins/news/news.php(1299): comment->compose_comment()
[Sat Nov 28 07:42:08.146943 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #12 ~/public_html/e107_plugins/news/news.php(236): news_front->renderComments()
[Sat Nov 28 07:42:08.146950 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #13 ~/public_html/e107_plugins/news/news.php(1895): news_front->render()
[Sat Nov 28 07:42:08.146955 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #14 ~/public_html/news.php(23): require_once('...')
[Sat Nov 28 07:42:08.146961 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #15 ~/public_html/index.php(103): include('...')
[Sat Nov 28 07:42:08.146967 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr: #16 {main}
[Sat Nov 28 07:42:08.146972 2020] [fcgid:warn] [pid 224726:tid 140236713551616] [client xxx.xxx.xxx.xxx:0] mod_fcgid: stderr:   thrown in ~/public_html/e107_handlers/bbcode_handler.php(390) : eval()'d code on line 6
```
2020-11-30 12:55:04 +01:00

7 lines
186 B
BlitzBasic

//<?
$class = e107::getBB()->getClass('time');
include_once(e_HANDLER."date_handler.php");
return "<span class='{$class}'>".e107::getDate()->convert_date($code_text, $parm)."</span>";