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

Gallery Snippet undefined offset at line 114 #297

Open
danFWD opened this issue Jun 16, 2017 · 0 comments
Open

Gallery Snippet undefined offset at line 114 #297

danFWD opened this issue Jun 16, 2017 · 0 comments

Comments

@danFWD
Copy link

danFWD commented Jun 16, 2017

At line 114 of the Gallery snippet, under certain circumstances, the $keyBits offset of 1 is undefined:

if (isset($keyBits[0]) && $keyBits[0] === 'thumbTpl') {
 if ($i = (int) $keyBits[1]) $nthTpls[$i] = $scriptProperties[$key];
}

The patch is to add one more conditional:

if (isset($keyBits[0]) && $keyBits[0] === 'thumbTpl' && isset($keyBits[1])) {
 if ($i = (int) $keyBits[1]) $nthTpls[$i] = $scriptProperties[$key];
}

I'm not sure what the underlying cause is, however, it didn't seem to adversely affect the output.

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