Update length.php

Fixes division by zero error when length class not found.  weight.php already does this.