machinateur / tab-transfer

A tool to transfer Google Chrome tabs from your Android or iPhone to your computer.
MIT License
100 stars 10 forks source link

PHP Fatal Error - Typed property $date accessed before initialization in CopyTabsCommand #32

Closed UtopianElectronics closed 3 weeks ago

UtopianElectronics commented 3 weeks ago

I'm using Linux with PHP version 8.2.21:

PHP 8.2.21 (cli) (built: Jul  2 2024 12:51:54) (NTS gcc x86_64)

When I run ./copy-tabs.sh, I get this error:

PHP Fatal error:  Uncaught Error: Typed property Machinateur\ChromeTabTransfer\Command\CopyTabsCommand::$date must not be accessed before initialization in /home/myusername/android-chrome-tab-transfer/src/Command/CopyTabsCommand.php:103
Stack trace:
#0 /home/myusername/android-chrome-tab-transfer/vendor/symfony/console/Command/Command.php(122): Machinateur\ChromeTabTransfer\Command\CopyTabsCommand->configure()
#1 /home/myusername/android-chrome-tab-transfer/src/Command/CopyTabsCommand.php(90): Symfony\Component\Console\Command\Command->__construct()
#2 /home/myusername/android-chrome-tab-transfer/copy-tabs.php(32): Machinateur\ChromeTabTransfer\Command\CopyTabsCommand->__construct()
#3 {main}
  thrown in /home/myusername/android-chrome-tab-transfer/src/Command/CopyTabsCommand.php on line 103

I get the same error message if I run php copy-tabs.phar after having built phar from source.

machinateur commented 3 weeks ago

Hello @UtopianElectronics,

thanks for reporting this. I've fixed the error in 0.4.6.

Reason for the issue was wrong variable access inside the command's logic, introduced in 0.4.5. Sorry for the inconvenience.