cvs: pear /Payment_Clieop clieop.php

From: Date: Wed, 03 Apr 2002 20:41:14 +0000
Subject: cvs: pear /Payment_Clieop clieop.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3012@lists.php.net to get a copy of this message
zyprexia Wed Apr 3 15:41:14 2002 EDT Modified files: /pear/Payment_Clieop clieop.php Log: Fixed filler bug. If length was negative an error occured. Fixed with abs function Index: pear/Payment_Clieop/clieop.php diff -u pear/Payment_Clieop/clieop.php:1.4 pear/Payment_Clieop/clieop.php:1.5 --- pear/Payment_Clieop/clieop.php:1.4 Wed Apr 3 15:37:47 2002 +++ pear/Payment_Clieop/clieop.php Wed Apr 3 15:41:14 2002 @@ -16,7 +16,7 @@ // | Authors: Dave Mertens <dmertens@zyprexia.com> | // +----------------------------------------------------------------------+ // -// $Id: clieop.php,v 1.4 2002/04/03 20:37:47 zyprexia Exp $ +// $Id: clieop.php,v 1.5 2002/04/03 20:41:14 zyprexia Exp $ /* Please note that public function names are partly in Dutch. This is because also the clieop data strings has a dutch names. (batchvoorloopinfo, transactieinfo, etc). @@ -25,7 +25,7 @@ /** * Main clieop class * -* @version $Revision: 1.4 $ +* @version $Revision: 1.5 $ * @access public * @author Dave Mertens <dmertens@zyprexia.com> * @package Payment_Clieop @@ -576,7 +576,7 @@ /** * master object for clieop objects * -* @version $Revision: 1.4 $ +* @version $Revision: 1.5 $ * @access private * @author Dave Mertens <dmertens@zyprexia.com> * @package Payment_Clieop @@ -594,7 +594,7 @@ function alfaFiller($text, $length) { //how many spaces do we need? - $alfaLength = $length - strlen($text); + $alfaLength = abs($length - strlen($text)); //return string with spaces on right side return substr(str_repeat(" ", $alfaLength) . $text, $length); @@ -611,7 +611,7 @@ { //how many zeros do we need settype($number, "string"); //We need to be sure that number is a string. 001 will otherwise be parsed as 1 - $numberLength = $lentgh - strlen($number) + $numberLength = abs($lentgh - strlen($number)); //return original number woth zeros on the left return substr(str_repeat("0", $numberLength) . $number, $length);

« previous php.pear.cvs (#3012) next »