@@ -538,7 +538,7 @@ final public function drawHiddenAttributes() {
538
538
final protected function drawHiddenValueAttribute ($ attribute ,$ i ) {
539
539
if (DEBUGTMP ) printf ('<font size=-2>%s</font><br /> ' ,__METHOD__ );
540
540
541
- $ val = $ attribute ->getValue ($ i );
541
+ $ val = $ attribute ->getValue ($ i, '' );
542
542
543
543
printf ('<input type="hidden" name="new_values[%s][%s]" id="new_values_%s_%s" value="%s" /> ' ,
544
544
htmlspecialchars ($ attribute ->getName ()),$ i ,htmlspecialchars ($ attribute ->getName ()),$ i ,
@@ -607,7 +607,7 @@ protected function drawFormValueAttribute($attribute,$i) {
607
607
protected function drawFormReadOnlyValueAttribute ($ attribute ,$ i ) {
608
608
if (DEBUGTMP ) printf ('<font size=-2>%s</font><br /> ' ,__METHOD__ );
609
609
610
- $ val = $ attribute ->getValue ($ i );
610
+ $ val = $ attribute ->getValue ($ i, '' );
611
611
612
612
printf ('<input type="text" class="roval" name="new_values[%s][%s]" id="new_values_%s_%s" value="%s" readonly="readonly" /> ' ,
613
613
htmlspecialchars ($ attribute ->getName ()),$ i ,htmlspecialchars ($ attribute ->getName ()),$ i ,htmlspecialchars ($ val ));
@@ -616,7 +616,7 @@ protected function drawFormReadOnlyValueAttribute($attribute,$i) {
616
616
protected function drawFormReadWriteValueAttribute ($ attribute ,$ i ) {
617
617
if (DEBUGTMP ) printf ('<font size=-2>%s</font><br /> ' ,__METHOD__ );
618
618
619
- $ val = $ attribute ->getValue ($ i );
619
+ $ val = $ attribute ->getValue ($ i, '' );
620
620
621
621
if ($ attribute ->getHelper () || $ attribute ->getVerify ())
622
622
echo '<table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top"> ' ;
@@ -720,7 +720,7 @@ protected function drawFormReadWriteValueBinaryAttribute($attribute,$i) {
720
720
protected function drawFormReadWriteValueDateAttribute ($ attribute ,$ i ) {
721
721
if (DEBUGTMP ) printf ('<font size=-2>%s</font><br /> ' ,__METHOD__ );
722
722
723
- $ val = $ attribute ->getValue ($ i );
723
+ $ val = $ attribute ->getValue ($ i, '' );
724
724
725
725
echo '<span style="white-space: nowrap;"> ' ;
726
726
printf ('<input type="text" class="value" id="new_values_%s_%s" name="new_values[%s][%s]" value="%s" %s%s %s %s/> ' ,
@@ -738,7 +738,7 @@ protected function drawFormReadWriteValueDateAttribute($attribute,$i) {
738
738
protected function drawFormReadWriteValueDnAttribute ($ attribute ,$ i ) {
739
739
if (DEBUGTMP ) printf ('<font size=-2>%s</font><br /> ' ,__METHOD__ );
740
740
741
- $ val = $ attribute ->getValue ($ i );
741
+ $ val = $ attribute ->getValue ($ i, '' );
742
742
743
743
if ($ attribute ->getHelper ())
744
744
echo '<table cellspacing="0" cellpadding="0"><tr><td valign="top"> ' ;
@@ -952,7 +952,7 @@ protected function drawFormReadOnlyValuePasswordAttribute($attribute,$i) {
952
952
if (DEBUGTMP ) printf ('<font size=-2>%s</font><br /> ' ,__METHOD__ );
953
953
954
954
$ server = $ this ->getServer ();
955
- $ val = $ attribute ->getValue ($ i );
955
+ $ val = $ attribute ->getValue ($ i, '' );
956
956
957
957
if (trim ($ val ))
958
958
$ enc_type = get_enc_type ($ val );
@@ -974,7 +974,7 @@ protected function drawFormReadWriteValuePasswordAttribute($attribute,$i) {
974
974
if (DEBUGTMP ) printf ('<font size=-2>%s</font><br /> ' ,__METHOD__ );
975
975
976
976
$ server = $ this ->getServer ();
977
- $ val = $ attribute ->getValue ($ i );
977
+ $ val = $ attribute ->getValue ($ i, '' );
978
978
979
979
$ enc_type = get_enc_type ($ val );
980
980
@@ -1102,7 +1102,7 @@ protected function drawFormReadWriteValueSelectionAttribute($attribute,$i) {
1102
1102
1103
1103
# This is a single value attribute
1104
1104
} else {
1105
- $ val = $ attribute ->getValue ($ i ) ? $ attribute ->getValue ($ i ) : $ attribute ->getDefault ();
1105
+ $ val = $ attribute ->getValue ($ i ) ? $ attribute ->getValue ($ i ) : ( is_null ( $ attribute ->getDefault ())? '' : $ attribute -> getDefault () );
1106
1106
1107
1107
if ($ attribute ->getHelper ())
1108
1108
echo '<table cellspacing="0" cellpadding="0"><tr><td valign="top"> ' ;
0 commit comments