matthiasstraka / php-invest

Self-hosted stock portfolio tracking software using PHP/Symfony. It tracks portfolios across multiple brokers and automatically updates daily stock data. It allows tracking trades of raw stock and EUSIPA derivatives/instruments.
GNU General Public License v3.0
18 stars 7 forks source link

Crash when rendering an instrument without underlying price data #22

Closed matthiasstraka closed 1 year ago

matthiasstraka commented 1 year ago
  1. Create an asset but do not download price data
  2. Create an instrument (like Mini Future)
  3. Crash with Uncaught PHP Exception Error: "Call to a member function getDate() on null" at /..../php-invest/src/Service/InstrumentPriceService.php line 212' $terms = self::interpolateKnockoutTerms($terms, $asset_price->getDate());