Skip to content

Commit 59c785b

Browse files
committed
Fix error where form cannot be submitted because of post_max_size=0
Symfony triggers an error on form submission if we set the post_max_size to 0 (to disable the limit)
1 parent a45741d commit 59c785b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/validator/sfValidatorSchema.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected function doClean($values)
110110
$errorSchema = new sfValidatorErrorSchema($this);
111111

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

0 commit comments

Comments
 (0)