Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case sensitivity & array index #147

Open
Streusel opened this issue Oct 11, 2022 · 0 comments
Open

Case sensitivity & array index #147

Streusel opened this issue Oct 11, 2022 · 0 comments

Comments

@Streusel
Copy link
Contributor

Streusel commented Oct 11, 2022

In https://github.com/GeSHi/geshi-1.0/blob/master/src/geshi.php#L3382
We're provided with the following line:
$case_sensitive = $this->language_data['CASE_SENSITIVE'][$k];
The issue is that we cannot simply assume that the user 100% of the times has setup their files properly. This isn't a critical error but is one nonetheless.
My 'fix' for this instance, would be to check if the key exists

if(isset($this->language_data['CASE_SENSITIVE'][$k]))
   $case_sensitive = $this->language_data['CASE_SENSITIVE'][$k];
else
   $case_sensitive = false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant