Skip to content

Case sensitivity & array index #147

@Streusel

Description

@Streusel

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions