Index: branches/5.1.x/units/shipping_quote_engines/usps.php =================================================================== diff -u -r13549 -r13566 --- branches/5.1.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 13549) +++ branches/5.1.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 13566) @@ -1,6 +1,6 @@ 10 ) { $res = substr($res, 0, 10); - } + } return $res != '' ? $res : $phone; } @@ -991,6 +991,11 @@ } if ( $label_file != '' ) { + $file_helper =& $this->Application->recallObject('FileHelper'); + /* @var $file_helper FileHelper */ + + $file_helper->CheckFolder(USPS_LABEL_FOLDER); + if (!$handle = fopen($label_file, 'a')) echo "Cannot open file ($label_file)"; if ( @fwrite($handle, $DeliveryConfirmationLabel) === FALSE) echo "Cannot write to file ($label_file)"; }