ispCP - Board - Support
Ticket #2051 - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: Tickets / Roadmap / Timeline (/forum-50.html)
+--- Thread: Ticket #2051 (/thread-8422.html)



Ticket #2051 - kazuo - 11-12-2009 05:42 PM

The error did not occur.
Thank you.


RE: Ticket #2051 - kazuo - 11-21-2009 06:20 PM

Did you change revision contents?
A message is given.

-----------------
Cron <root@XXX> /var/www/ispcp/engine/quota/ispcp-dsk-quota &>/var/log/ispcp/ispcp-dsk-quota.log

Use of uninitialized value in pattern match (m//) at /var/www/ispcp/engine/quota/ispcp-dsk-quota line 209.
Use of uninitialized value in pattern match (m//) at /var/www/ispcp/engine/quota/ispcp-dsk-quota line 210.

------------------


RE: Ticket #2051 - RatS - 11-21-2009 10:19 PM

please try to replace starting @ line 207 at /var/www/ispcp/engine/quota/ispcp-dsk-quota

Quote: foreach(@$ref) {
# Replace unknown values by 0
$data_length = (@$_[6] =~ /^\d+$/) ? @$_[6] : 0;
$index_length = (@$_[8] =~ /^\d+$/) ? @$_[8] : 0;

$size += $data_length + $index_length;
}

by

Quote: foreach(@$ref) {
# Replace unknown values by 0
$data_length = (defined(@$_[6]) && @$_[6] =~ /^\d+$/) ? @$_[6] : 0;
$index_length = (defined(@$_[8]) && @$_[8] =~ /^\d+$/) ? @$_[8] : 0;

$size += $data_length + $index_length;
}

Does the warning still occurs?


RE: Ticket #2051 - kazuo - 11-22-2009 03:00 PM

The problem was solved.
Thank you.

(11-21-2009 10:19 PM)RatS Wrote:  please try to replace starting @ line 207 at /var/www/ispcp/engine/quota/ispcp-dsk-quota

Quote: foreach(@$ref) {
# Replace unknown values by 0
$data_length = (@$_[6] =~ /^\d+$/) ? @$_[6] : 0;
$index_length = (@$_[8] =~ /^\d+$/) ? @$_[8] : 0;

$size += $data_length + $index_length;
}

by

Quote: foreach(@$ref) {
# Replace unknown values by 0
$data_length = (defined(@$_[6]) && @$_[6] =~ /^\d+$/) ? @$_[6] : 0;
$index_length = (defined(@$_[8]) && @$_[8] =~ /^\d+$/) ? @$_[8] : 0;

$size += $data_length + $index_length;
}

Does the warning still occurs?