kpumuk / codecolorer

WordPress plugin which allows you to insert code snippets into the post with nice syntax highlighting.
https://kpumuk.info/projects/wordpress-plugins/codecolorer/
56 stars 14 forks source link

Undefined offset: 1 in codecolorer-options.php:75 #31

Closed flowdee closed 1 year ago

flowdee commented 4 years ago

Receiving thousands of Undefined offset in my logs:

/www/my_site/public/wp-content/plugins/codecolorer/codecolorer-options.php:75 in CodeColorerOptions::parseOptions
/www/my_site/public/wp-content/plugins/codecolorer/codecolorer-core.php:128 in CodeColorer->performHighlightCodeBlock
/www/my_site/public/wp-content/plugins/codecolorer/codecolorer-core.php:61 in CodeColorer->{closure}
:0 in preg_replace_callback
/www/my_site/public/wp-content/plugins/codecolorer/codecolorer-core.php:64 in CodeColorer->beforeHighlightCodeBlock
/www/my_site/public/wp-content/plugins/codecolorer/codecolorer.php:265 in CodeColorerLoader::callBeforeHighlightCodeBlock
/www/my_site/public/wp-includes/class-wp-hook.php:287 in WP_Hook->apply_filters
/www/my_site/public/wp-includes/plugin.php:206 in apply_filters
/www/my_site/public/wp-includes/post-template.php:253 in the_content
/www/my_site/public/wp-content/themes/themedd/template-parts/content-download.php:18 in require
/www/my_site/public/wp-includes/template.php:725 in load_template
/www/my_site/public/wp-includes/template.php:672 in locate_template
/www/my_site/public/wp-includes/general-template.php:168 in get_template_part
/www/my_site/public/wp-content/themes/themedd/single-download.php:25 in include
/www/my_site/public/wp-includes/template-loader.php:106 in require_once
/www/my_site/public/wp-blog-header.php:19 in require
/www/my_site/public/index.php:17
/www/my_site/public/wp-content/plugins/codecolorer/codecolorer-options.php:75 in CodeColorerOptions::parseOptions
73:
        $options = self::populateDefaultValues($options);
74:
75:
        @list($modes, $lang) = explode('_', $suffix, 2);
76:
        if (null !== ($mode = self::parseMode($modes, 'i'))) {
77:
            $options['inline'] = $mode;
ajtruckle commented 4 years ago

I use EnlighterJS for all code syntax highlighting now.

Get Outlook for iOShttps://aka.ms/o0ukef


From: flowdee notifications@github.com Sent: Friday, July 10, 2020 9:24:37 AM To: kpumuk/codecolorer codecolorer@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [kpumuk/codecolorer] Undefined offset: 1 in codecolorer-options.php:75 (#31)

Receiving thousands of Undefined offset in my logs:

/www/my_site/public/wp-content/plugins/codecolorer/codecolorer-options.php:75 in CodeColorerOptions::parseOptions /www/my_site/public/wp-content/plugins/codecolorer/codecolorer-core.php:128 in CodeColorer->performHighlightCodeBlock /www/my_site/public/wp-content/plugins/codecolorer/codecolorer-core.php:61 in CodeColorer->{closure} :0 in preg_replace_callback /www/my_site/public/wp-content/plugins/codecolorer/codecolorer-core.php:64 in CodeColorer->beforeHighlightCodeBlock /www/my_site/public/wp-content/plugins/codecolorer/codecolorer.php:265 in CodeColorerLoader::callBeforeHighlightCodeBlock /www/my_site/public/wp-includes/class-wp-hook.php:287 in WP_Hook->apply_filters /www/my_site/public/wp-includes/plugin.php:206 in apply_filters /www/my_site/public/wp-includes/post-template.php:253 in the_content /www/my_site/public/wp-content/themes/themedd/template-parts/content-download.php:18 in require /www/my_site/public/wp-includes/template.php:725 in load_template /www/my_site/public/wp-includes/template.php:672 in locate_template /www/my_site/public/wp-includes/general-template.php:168 in get_template_part /www/my_site/public/wp-content/themes/themedd/single-download.php:25 in include /www/my_site/public/wp-includes/template-loader.php:106 in require_once /www/my_site/public/wp-blog-header.php:19 in require /www/my_site/public/index.php:17

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkpumuk%2Fcodecolorer%2Fissues%2F31&data=02%7C01%7C%7C544a2e5c0b604435c16308d824aab054%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637299662798062126&sdata=9C4WxDIZ65fYxF%2FW61dE11%2BGMItq7vJtKKU2TxsqXgQ%3D&reserved=0, or unsubscribehttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAB45RMY67FDUG6J2HWIV7T3R23F4LANCNFSM4OWLVXAQ&data=02%7C01%7C%7C544a2e5c0b604435c16308d824aab054%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637299662798062126&sdata=hC%2B0bmLl0DxdFfr7lKUx3qpDQvyo5Gn4xo6kZvheFBw%3D&reserved=0.

flowdee commented 4 years ago

Thanks for the tip @ajtruckle , they also have a WP plugin which I will check out https://wordpress.org/plugins/enlighter/

ajtruckle commented 4 years ago

Yes, I use it. Excellent user support (on github).

Get Outlook for iOShttps://aka.ms/o0ukef


From: flowdee notifications@github.com Sent: Friday, July 10, 2020 2:53:23 PM To: kpumuk/codecolorer codecolorer@noreply.github.com Cc: ajtruckle truckleaj-software@hotmail.co.uk; Mention mention@noreply.github.com Subject: Re: [kpumuk/codecolorer] Undefined offset: 1 in codecolorer-options.php:75 (#31)

Thanks for the tip @ajtrucklehttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fajtruckle&data=02%7C01%7C%7Ce27083f2695d410e841d08d824d89d9e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637299860051771659&sdata=knfGWsA26EaBYlAPr78bYD1%2FlqSin0Y8UIahO5UK%2FXY%3D&reserved=0 , they also have a WP plugin which I will check out https://wordpress.org/plugins/enlighter/https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwordpress.org%2Fplugins%2Fenlighter%2F&data=02%7C01%7C%7Ce27083f2695d410e841d08d824d89d9e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637299860051771659&sdata=CFQhynKs0FjSm0HfU%2BqyN7CFSUN9EtBeXrhpMHBFk1c%3D&reserved=0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkpumuk%2Fcodecolorer%2Fissues%2F31%23issuecomment-656688551&data=02%7C01%7C%7Ce27083f2695d410e841d08d824d89d9e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637299860051781654&sdata=bR8Qz%2BwZ%2FMXkVGYz1Odf3pZtA50rkw3xeMIOpfN68cU%3D&reserved=0, or unsubscribehttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAB45RMYARBJKLMDRGWJCSJDR24MNHANCNFSM4OWLVXAQ&data=02%7C01%7C%7Ce27083f2695d410e841d08d824d89d9e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637299860051781654&sdata=%2BcL9O35pLP74EWxEYY65Hiz%2Bo%2FKzGGNg7R5xKzd4h2U%3D&reserved=0.