Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Model_Temporal::find() throwing incompatible definition error
  • Hi-
    Went to upgrade from 1.8.1 to 1.8.2 today and i'm getting the below error on all my models that extend Model_Temporal (when using ::find()). Server is running PHP 7.1.2.

    Thanks
     



    Warning!


    ErrorException [ Warning ]: Declaration of Orm\Model_Temporal::find($id = NULL, array $options = Array) should be compatible with Orm\Model::find($id = NULL, ?array $options = NULL)


    PKGPATH/orm/classes/model/temporal.php @ line 674:


    673:	
    <strong>674: }</strong>
    <br>
    <b>Notice</b>: Undefined offset: 675 in <b>.../fuel/core/views/errors/php_error.php</b> on line <b>9</b><br>
    675:

  • Harro VertonHarro Verton
    Accepted Answer
    It is related to the PHP version, which now emits an error when this happens. 

    Fixed here: https://github.com/fuel/orm/commit/c21fe18f5cfaa32a2aebf07eb05c8c7735b60b54, you can switch to the 1.9/dev codebase for the ORM, backport the fix yourself, or wait for the next hotfix release.
  • Thanks, realized this shortly after posting. i'll fix it myself for now, and will look out of the hotfix.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion