Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Compatibility issues with PHP7 (YAGA)
pavsid
New
Hi, since upgrading to PHP7 I am getting errors with the YAGA application, in particular...
Gdn_ErrorException: Declaration of RankModel::Delete($RankID) should be compatible with Gdn_Model::delete($where = Array, $options = Array)
And
Declaration of RankModel::Get() should be compatible with Gdn_Model::get($OrderFields = '', $OrderDirection = 'asc', $Limit = false, $PageNumber = false)
Can anybody suggest the best solution?
0
Comments
I just updated the various methods in YAGA do that they were compatible - can't see it being the best solution though as not very "upgradable". Hopefully any upgrades will address this issue though, so I guess it doesn't matter much.
Hi @pavsid can you share the solution to make this methods "compatible"?
That would be of help, thanks in advance!
Bests!
Look at https://github.com/pioc92/Application-Yaga
@pioc34 great!, that branch worked!, I downloaded and renamed the folder to "yaga", then all the warnings are gone!
Thanks!!!
I realized that there are 2 new warning now, but only when going to the Yaga.BestConteny, let me copy here:
Declaration of ActedModel::Get($UserID, $ActionID, $Limit = NULL, $Offset = 0) should be compatible with Gdn_Model::get($orderFields = '', $orderDirection = 'asc', $limit = false, $pageNumber = false)
2 [internal function]: Vanilla\AddonManager->autoload('ActedModel')
3 [internal function]: spl_autoload_call('ActedModel')
4 ..../library/core/class.controller.php(954): class_exists('ActedModel')
5 ..../library/core/class.dispatcher.php(884): Gdn_Controller->getImports()
6 ..../library/core/class.dispatcher.php(806): Gdn_Dispatcher->createController('BestController', Object(Gdn_Request), Array)
7 ..../library/core/class.dispatcher.php(274): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array)
8 ..../index.php(29): Gdn_Dispatcher->dispatch()
9
Attempt to assign property of non-object
0 ..../library/core/functions.general.php(1713): gdn_ErrorHandler(2, 'Attempt to assi...', '/var/www/vhosts...', 1713, Array)
1 ..../applications/yaga/models/class.actedmodel.php(477): getRecord('comment', 1)
2 ..../applications/yaga/models/class.actedmodel.php(390): ActedModel->GetRecord('comment', 1)
3 ..../applications/yaga/models/class.actedmodel.php(317): ActedModel->Prepare(Array)
4 ..../applications/yaga/controllers/class.bestcontroller.php(52): ActedModel->GetRecent(10, 0)
5 ..../library/core/class.dispatcher.php(845): BestController->Index(0)
6 ..../library/core/class.dispatcher.php(274): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array)
7 ..../index.php(29): Gdn_Dispatcher->dispatch()
8
Any idea on how to solve this?
The first is a simple notice with php 7. It's not problematic, you just have to hide them. I will look at it when i will have enough time.