econpy / torque

A set of tools used with the Torque app for Android to store OBD2 data in MySQL, view GPS data from Torque on a map in real time using the Google Maps JavaScript API, plot OBD2 data in time series charts, and export the data to CSV or JSON.
MIT License
285 stars 120 forks source link

Missing dollar in upload script #10

Closed mvherweg closed 10 years ago

mvherweg commented 10 years ago

On line 35 of the upload_data.php script, it states:

if (!in_array($key, $dbfields) and submitval == 1) {

At least when using nginx (with php5-fpm), this results in entries to the error.log:

PHP message: PHP Notice:  Use of undefined constant submitval - assumed 'submitval' in /var/www/torque/root/upload_data.php on line 35" while reading response header from upstream...

Adding a dollar to submitval solved the issue:

if (!in_array($key, $dbfields) and $submitval == 1) {
econpy commented 10 years ago

Whoops, you're absolutely right. Silly typo on my end.

Fixed here.