Comments (12)
array_unique() expects parameter 1 to be array, integer given in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 1535
from php-fit-file-analysis.
Hi @OlafvdSpek - obviously something is going quite horribly wrong! The $architecture should only be 0 or 1 for big or little-endianess.
Are you able to share a FIT file where this is happening? What type of activity and what device have you used to record it?
Cheers, Adrian.
from php-fit-file-analysis.
Sure, what's your email address?
from php-fit-file-analysis.
You can save a file as a .TXT and upload it here if that works? Cheers
from php-fit-file-analysis.
I'd like the file to stay (semi) private..
from php-fit-file-analysis.
Hi Adrian,
Any luck?
from php-fit-file-analysis.
@adriangibbons Ping ;)
from php-fit-file-analysis.
Hi @OlafvdSpek
Are you still having issues? You'd shared two files with me via email:
garmin.fit
As discussed via email, neither of us is able to reproduce the error and everything seems OK.
1.fit
This doesn't seem like an activity is recorded in the file (which is only 494 bytes) - maybe something went wrong when recording this.
This is confirmed if I upload to Strava:
from php-fit-file-analysis.
$ php test-fit.php 1.fit
PHP Warning: array_unique() expects parameter 1 to be array, integer given in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 1543
Warning: array_unique() expects parameter 1 to be array, integer given in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 1543
$ php test-fit.php 2.fit
PHP Notice: Undefined offset: 14 in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 1232
Notice: Undefined offset: 14 in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 1232
PHP Notice: Undefined offset: 73 in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 1232
Notice: Undefined offset: 73 in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 1232
PHP Notice: Undefined offset: 14 in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 1232
Notice: Undefined offset: 14 in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 1232
PHP Notice: Undefined offset: 14 in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 1232
Notice: Undefined offset: 14 in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 1232
PHP Fatal error: Uncaught Error: Unsupported operand types in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php:2720
Stack trace:
#0 vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php(1143): adriangibbons\phpFITFileAnalysis->processHrMessages()
#1 test-fit.php(6): adriangibbons\phpFITFileAnalysis->__construct('2.fit')
#2 {main}
thrown in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 2720
Fatal error: Uncaught Error: Unsupported operand types in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php:2720
Stack trace:
#0 vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php(1143): adriangibbons\phpFITFileAnalysis->processHrMessages()
#1 test-fit.php(6): adriangibbons\phpFITFileAnalysis->__construct('2.fit')
#2 {main}
thrown in vendor/adriangibbons/php-fit-file-analysis/src/phpFITFileAnalysis.php on line 2720
$ composer info
adriangibbons/php-fit-file-analysis v3.2.2 A PHP class for analysing FIT files created by Garmin GPS devices
$ md5sum *.fit
acc6b419f903165f9a6cc4dd8e8a60d2 1.fit
60df7628d0105886a16f63dfcfdc846c 2.fit
c4b2b452ad461e1415b6f337d3e4523b issue-49.fit
$ cat test-fit.php
<?php
require __DIR__ . '/vendor/autoload.php';
// echo $_SERVER['argv'][1], ":\n";
new adriangibbons\phpFITFileAnalysis($_SERVER['argv'][1]);
$ php --version
PHP 7.0.33-11+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Sep 2 2019 13:31:10) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.33-11+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
with blackfire v1.27.1~linux-x64-non_zts70, https://blackfire.io, by Blackfire
from php-fit-file-analysis.
This doesn't seem like an activity is recorded in the file (which is only 494 bytes) - maybe something went wrong when recording this.
Hi Adrian,
Maybe, but shouldn't the lib be able to handle that without PHP warnings?
I've emailed you 2.fit, a file that causes other warnings / errors. Let me know if you can reproduce them.
from php-fit-file-analysis.
Just made a quick commit that should fix the issue with 1.fit
Family, work, life, other projects have been preventing me from progressing the other issues.
from php-fit-file-analysis.
Thanks!
from php-fit-file-analysis.
Related Issues (20)
- Problem with some latitude fields? HOT 13
- Notice: Undefined offset: 84 in phpFITFileAnalysis.php on lineย 1228 HOT 4
- Precision rounding of fields HOT 3
- data_mesgs['record'] null HOT 8
- getJSON function for laps or other fit sections HOT 2
- loadFromFile, loadFromData Suggestion... HOT 3
- incorrect speed values HOT 8
- pause or smart record HOT 1
- data_mesgs['session'] is null HOT 6
- example for leaflet js HOT 3
- Multiple sessions HOT 5
- Suunto Ambit Support HOT 5
- Garmin Product Information is incorrect HOT 2
- Help with corrupted FIT file HOT 7
- Multisport HOT 1
- Error processing FIT files caused by invalid $architecture variable
- Demo not working HOT 3
- Google Geocoding API: Error HOT 3
- [(Probably) since Garmin Edge 1040 Solar Firmware Update] Uncaught TypeError: end(): Argument #1 ($array) must be of type array, null given HOT 9
- Missing Data from Garmin FIT File - strengh_training
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-fit-file-analysis.