Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Error message (user's fault!)

Discussion in 'Stock Trader Support' started by sitwi, Oct 7, 2012.

  1. sitwi

    sitwi Member Sportsbook Pickem

    Hi mate,

    Any idea what causes the following error? I suspect he's somehow tried to purchase zero shares, or shares with a zero value(?!)

    Server Error

    Division by zero
    1. XenForo_Application::handlePhpError() in NFLJ/StockTrader/Model/Stock.php at line 370
    2. NFLJ_StockTrader_Model_Stock->formatUserStockInfo() in NFLJ/StockTrader/ControllerPublic/Portfolio.php at line 45
    3. NFLJ_StockTrader_ControllerPublic_Portfolio->actionIndex() in XenForo/FrontController.php at line 310
    4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    5. XenForo_FrontController->run() in /homepages/20/d204998416/htdocs/SoN/index.php at line 13
    EDIT: solved it. One of his stocks hit a price of 0.000 - I've changed the rules now so that the minimum price is 1.00.
  2. Bob

    Bob Developer Staff Member

    Im working on some better ways to handle "penny" stocks as well as some additional administrative tools to also help manage issues with penny stocks that go defunct.
  3. Bob

    Bob Developer Staff Member

    I've added in code now that prevents the purchase of Penny stocks less than .01 in value. What was happening is people were purchasing stocks that were 0.004 and less which when rounded to 2 decimal spots would be 0.00 which will throw a division by 0 error when used in a calculation within the format user stock method.
    Sheldon and sitwi like this.
  4. sitwi

    sitwi Member Sportsbook Pickem

    Thanks for that - I guessed from the division by zero error that this was the problem.

    All sorted :)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.