[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Bug in minivend.PL
****** message to minivend-users from Mike Heins <mikeh@minivend.com> ******
Quoting Stefan Hornburg (racke@linuxia.de):
>
> Hello, MV community !
>
> I probably spotted a bug in minivend.PL. Without the following patch
> the error message will never reached, because $data{$prikey} is
> a reference to an array, which evaluates true even if the array
> is empty.
>
> Ciao
> Racke
>
> diff -u -c -r1.7 minivend.PL
> *** minivend.PL 2000/07/24 07:59:39 1.7
> --- minivend.PL 2000/07/30 12:58:32
> ***************
> *** 444,450 ****
> @{$data{$key}} = split /\0/, $value;
> }
>
> ! unless ($data{$prikey}) {
> logError("No key '%s' found for function='%s' table='%s' key='%s'",
> $prikey, $function,
> $CGI::values{mv_data_table},
> --- 444,450 ----
> @{$data{$key}} = split /\0/, $value;
> }
>
> ! unless (@{$data{$prikey}}) {
> logError("No key '%s' found for function='%s' table='%s' key='%s'",
> $prikey, $function,
> $CGI::values{mv_data_table},
This is valid. I will make the change, though the change may take a different
form since I am adding autonumbering support.
Thanks as usual, Stefan. 8-)
--
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.8220 fax 7501 <heins@akopia.com>
Fast, reliable, cheap. Pick two and we'll talk. -- unknown
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list