Skip to content

Commit e31d6c2

Browse files
authored
1 parent 4c215e8 commit e31d6c2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/MassRender.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function drawMassFormReadWriteValueAttribute($attribute,$i,$j) {
2424
printf('<input type="text" class="value" name="mass_values[%s][%s][%s]" id="new_values_%s_%s_%s" value="%s" %s%s %s %s/>',
2525
$j,htmlspecialchars($attribute->getName()),$i,
2626
$j,htmlspecialchars($attribute->getName()),$i,
27-
htmlspecialchars($val),
27+
$val === null ? '' : htmlspecialchars($val),
2828
$attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
2929
$attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
3030
($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '',

lib/PageRender.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,12 @@ protected function drawFormValueObjectClassAttribute($attribute,$i) {
917917

918918
protected function getAutoPostPasswordAttribute($attribute,$i) {
919919
# If the password is already encoded, then we'll return
920-
if (preg_match('/^\{.+\}.+/',$attribute->getValue($i)))
920+
$value = $attribute->getValue($i);
921+
if ($value === null) {
922+
return;
923+
}
924+
925+
if (preg_match('/^\{.+\}.+/', $value))
921926
return;
922927

923928
$attribute->setPostValue(array('function'=>'PasswordEncrypt','args'=>sprintf('%%enc%%;%%%s%%',$attribute->getName())));

0 commit comments

Comments
 (0)