"Non-static method CRM_Financial_Form_BatchTransaction::links() should not be called statically" when viewing accounting batch
Non-static method CRM_Financial_Form_BatchTransaction::links() should not be called statically - File: ...\CRM\Financial\Page\AJAX.php - Line: 374 - URL: /civicrm/ajax/rest?className=CRM_Financial_Page_AJAX&fnName=getFinancialTransactionsList&snippet=4&context=financialBatch&entityID=1¬Present=1&statusID=1
This came up the other day and I forgot about it. The call to links is in a deprecated function, but the links() function looks like it should be static so maybe is an easy fix.
public function &links() {
if (!(self::$_links)) {
self::$_links = [
...stuff...
];
}
return self::$_links;
}
The other thing is only a couple lines down in the else clause after it calls CRM_Financial_Page_BatchTransaction::links(), it does
$tempBAO = new CRM_Financial_Page_BatchTransaction();
$links = $tempBAO->links();
which might then also be wrong.