PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   ReviewPost Bug Reports (http://www.photopost.com/forum/reviewpost-bug-reports/)
-   -   price paid not being put into database? (http://www.photopost.com/forum/reviewpost-bug-reports/115304-price-paid-not-being-put-into-database.html)

ncg August 18th, 2005 06:33 AM

price paid not being put into database?
 
a user of mine sent me this message this morning:

Quote:


I've come across a small bug in the reviews section. When submitting a review the "Price Paid" doesn't get written to the database. (It did this 3 times in a row on 3 different reviews.)As the page automatically redirects after submitting a review, you can see the "Price Paid" says 'Not Indicated'. So the value got dropped somwhere.

However, the information is written and committed when doing an edit on the "Price Paid" field.
does anybody know anything about this? thanks!

Chuck S August 18th, 2005 08:22 AM

I will have to do some testing with 2.91

3.0 is about ready to be released but looking at 2.91 I dont see anything out of place

try commenting out this line in reviews.php and see if it gets written

if ( !is_numeric($price) ) $price = 0;

ncg August 18th, 2005 03:46 PM

if 3.0 is about ready, ill just wait for that. its no big deal.

Chuck S August 18th, 2005 04:06 PM

Your welcome to grab a copy and try it out by emailing me. It has not been released yet but I think you'll be surprised ;)

http://www.photopost.com/members/for...d.php?t=114490

You would just upload all the files except config-inc.php and run the upgrade script

Arnie August 18th, 2005 04:23 PM

Perhpas your user was entering a price in the format "$46.23"? If the data isn't numeric it'll get ignored by reviewpost and treated and junk and you'll experience the issue you found.

Chuck S August 18th, 2005 04:36 PM

yeah well for 2.91 it looks okay but that was my suggestion

46.23 is a numeric variable so it would pass that query

try this

<?

$var="46.23";

if ( is_numeric($var) ) $var = "yes";

echo "$var";

?>


if you run that test script you will see 46.23 is a numeric value. $ is stripped from price a few lines above.

ncg August 19th, 2005 09:09 AM

Quote:

Originally Posted by Arnie
Perhpas your user was entering a price in the format "$46.23"? If the data isn't numeric it'll get ignored by reviewpost and treated and junk and you'll experience the issue you found.

interesting. that might be a possibility. ill ask.


All times are GMT -5. The time now is 03:30 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97