Skip to content

Commit d15188b

Browse files
committed
Merge pull request #16 from tristanbes/patch-1
Fix error where form cannot be submitted because of post_max_size=0
2 parents a45741d + 59c785b commit d15188b

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)