Giter VIP home page Giter VIP logo

Comments (12)

OlafvdSpek avatar OlafvdSpek commented on August 17, 2024
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.

adriangibbons avatar adriangibbons commented on August 17, 2024

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.

OlafvdSpek avatar OlafvdSpek commented on August 17, 2024

Sure, what's your email address?

from php-fit-file-analysis.

adriangibbons avatar adriangibbons commented on August 17, 2024

You can save a file as a .TXT and upload it here if that works? Cheers

from php-fit-file-analysis.

OlafvdSpek avatar OlafvdSpek commented on August 17, 2024

I'd like the file to stay (semi) private..

from php-fit-file-analysis.

OlafvdSpek avatar OlafvdSpek commented on August 17, 2024

Hi Adrian,

Any luck?

from php-fit-file-analysis.

OlafvdSpek avatar OlafvdSpek commented on August 17, 2024

@adriangibbons Ping ;)

from php-fit-file-analysis.

adriangibbons avatar adriangibbons commented on August 17, 2024

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:

Screen Shot 2019-10-05 at 10 43 54 am

from php-fit-file-analysis.

OlafvdSpek avatar OlafvdSpek commented on August 17, 2024
$ 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.

OlafvdSpek avatar OlafvdSpek commented on August 17, 2024

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.

adriangibbons avatar adriangibbons commented on August 17, 2024

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.

OlafvdSpek avatar OlafvdSpek commented on August 17, 2024

Thanks!

from php-fit-file-analysis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.