Skip to content

Commit

Permalink
Fix error where form cannot be submitted because of post_max_size=0
Browse files Browse the repository at this point in the history
Symfony triggers an error on form submission if we set the post_max_size to 0 (to disable the limit)
  • Loading branch information
tristanbes authored and j0k3r committed May 3, 2013
1 parent 967b668 commit 64232a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/validator/sfValidatorSchema.class.php
Expand Up @@ -110,7 +110,7 @@ protected function doClean($values)
$errorSchema = new sfValidatorErrorSchema($this);

// check that post_max_size has not been reached
if (isset($_SERVER['CONTENT_LENGTH']) && (int) $_SERVER['CONTENT_LENGTH'] > $this->getBytes(ini_get('post_max_size')))
if (isset($_SERVER['CONTENT_LENGTH']) && (int) $_SERVER['CONTENT_LENGTH'] > $this->getBytes(ini_get('post_max_size')) && ini_get('post_max_size') != 0)
{
$errorSchema->addError(new sfValidatorError($this, 'post_max_size'));

Expand Down

0 comments on commit 64232a8

Please sign in to comment.