Repository navigation
Conversation
First there is a typo and the `querylu` method is called instead of the `query` method in the `WeBWorK::ContentGenerator::pathMacro` method. Since that method doesn't exist, if that were ever called it would result in an exception. Fortunately, that is not actually every called! Also if the `%auth` and `%tail` hashes passed to the `query` call in the `WeBWorK::ContentGenerator::navMacro` method were empty then that `query` call would return a `Mojo::Parameters` object instead of the `Mojo::URL` object with query parameters added. Since that ends up being stringified and is an empty `Mojo::Parameters` object it is stringified as the empty string, which would make the returned URL be the root URL for the site instead of the desired URL. This does not happen at this point since the `effectiveUser` is always added, but if the `effectiveUser` were not always added, then this would break things. Passing a hash reference guarantees a proper `Mojo::URL` object is returned which will stringify to the correct URL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First there is a typo and the
querylumethod is called instead of thequerymethod in theWeBWorK::ContentGenerator::pathMacromethod. Since that method doesn't exist, if that were ever called it would result in an exception. Fortunately, that is not actually every called!Also if the
%authand%tailhashes passed to thequerycall in theWeBWorK::ContentGenerator::navMacromethod were empty then thatquerycall would return aMojo::Parametersobject instead of theMojo::URLobject with query parameters added. Since that ends up being stringified and is an emptyMojo::Parametersobject it is stringified as the empty string, which would make the returned URL be the root URL for the site instead of the desired URL. This does not happen at this point since theeffectiveUseris always added, but if theeffectiveUserwere not always added, then this would break things. Passing a hash reference guarantees a properMojo::URLobject is returned which will stringify to the correct URL.Just some things noticed working on other things.