Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TradeRepeater\Action\Archive - Notice: undefined property: stdClass $sell_price #228

Open
dfelton opened this issue Sep 7, 2021 · 0 comments
Labels
bug Something isn't working Priority - Low

Comments

@dfelton
Copy link
Owner

dfelton commented Sep 7, 2021

This one is a bit of a mixed bag....

  • It happened not because of a bug in the logic caused the data to get in such a state where it was possible to happen, but rather, because a manual MySQL query was incorrectly ran against the database which caused the record to be in status it wasn't supposed to be in (SELL_FILLED when it was supposed to be BUY_FILLED).
  • This use of stdClass as the result of a json_decode() on the meta column of trade_repeater is an area that highly could use some refactoring. Making use of class objects, interfaces, etc. So any 'fixing' on this exact issue while it is in this state would have to come also with the acceptance that it will be probably thrown away in that refactoring.

Still, logging an issue here for tracking purposes:

Shutdown Enabled at: 2021-09-07 20:32:09
Exception: Exception
Code: 0
Message: Notice: Undefined property: stdClass::$sell_price in /home/dfelton/gemini/src/TradeRepeater/Model/Resource/Trade/Action/Archive.php on line 34
Strace:
#0 src/TradeRepeater/Model/Resource/Trade/Action/Archive.php(34): Kobens\Core\ErrorHandler->handler(8, 'Undefined prope...', '/home/dfelton/g...', 34, Array)
#1 src/Command/Command/TradeRepeater/Archiver.php(102): Kobens\Gemini\TradeRepeater\Model\Resource\Trade\Action\Archive->addArchive(Object(Kobens\Gemini\TradeRepeater\Model\Trade))
#2 src/Command/Command/TradeRepeater/Archiver.php(85): Kobens\Gemini\Command\Command\TradeRepeater\Archiver->mainLoop(Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 vendor/symfony/console/Command/Command.php(255): Kobens\Gemini\Command\Command\TradeRepeater\Archiver->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Kobens\Gemini\Command\Command\TradeRepeater\Archiver), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 bin/gemini(445): Symfony\Component\Console\Application->run()
#8 {main}
@dfelton dfelton added bug Something isn't working Priority - Low labels Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority - Low
Projects
None yet
Development

No branches or pull requests

1 participant