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

ContextErrorException in Redirect.php line 109: #16

Closed
poznet opened this issue Feb 23, 2017 · 3 comments
Closed

ContextErrorException in Redirect.php line 109: #16

poznet opened this issue Feb 23, 2017 · 3 comments

Comments

@poznet
Copy link

poznet commented Feb 23, 2017

Hmm
Trying to test this extension .
After installation and adding to config (boltredirector.sahassar.yml)
redirects: oldkom: from: '/komputery.htm' to: '/kat/komputery'

when entering to komutery.htm i get

Uncaught Exception: ContextErrorException

ContextErrorException in Redirect.php line 109:
Warning: Invalid argument supplied for foreach()

Google this Exception

Any idea what it is about ?

@SvanteRichter
Copy link
Contributor

SvanteRichter commented Apr 25, 2017

Sorry for the very late reply... :(

Did you add it like this:

redirects: oldkom: from: '/komputery.htm' to: '/kat/komputery'

Or like this?

redirects:
    oldkom:
        from: '/komputery.htm'
        to: '/kat/komputery'

I'm not sure if github simply mangled your code or if it was added like in the first example.

@lenvanessen
Copy link
Contributor

Getting the same error here, it's because in de default YAML the variables: are empty,
and the script doesn't check if the variables are set before trying to loop over them

I'll make a pull request, haven't dug into the code that much but it's a quick fix:)

lenvanessen pushed a commit to lenvanessen/boltredirector that referenced this issue May 25, 2017
SvanteRichter pushed a commit that referenced this issue Sep 21, 2017
@SvanteRichter
Copy link
Contributor

Fixed in #20, no?

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

3 participants