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

[GeneratorBundle] Fix for page generation when there are no Page entities available in a bundle. #562

Merged

Conversation

tentwofour
Copy link
Contributor

Generating a new page when your bundle has no Page entities yields an error (maybe it's an edge use case?)

app/console kuma:generate:page
[....]

Symfony\Component\Debug\Exception\ContextErrorException]                                                                                                                                                                                  
  Catchable Fatal Error: Argument 7 passed to Kunstmaan\GeneratorBundle\Generator\PageGenerator::generate() must be of the type array, null given, called in /home/blair/Documents/workspace/my-studio/vendor/kunstmaan/bundles-cms/src/Kun  
  stmaan/GeneratorBundle/Command/GeneratePageCommand.php on line 80 and defined

PR sets the default value of $parentPages to an empty array in GeneratePageCommand.

@roderik roderik added this to the 3.2.2 milestone Jul 17, 2015
roderik pushed a commit that referenced this pull request Jul 17, 2015
…_parents

Fix for page generation when there are no Page entities available in a bundle.
@roderik roderik merged commit b256229 into Kunstmaan:master Jul 17, 2015
@roderik roderik changed the title Fix for page generation when there are no Page entities available in a bundle. [GeneratorBundle] Fix for page generation when there are no Page entities available in a bundle. Jul 17, 2015
@tentwofour tentwofour deleted the bugfix_page_generator_with_no_parents branch October 26, 2015 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants