Forum

Thread tagged as: Problem, Error

Get By Error for Custom App

PerchFactory.class.php - line 160, PerchUtil::implode_for_sql_in($val), doesn't exist as a function in PerchUtil class.

Updating to $this->db->implode_for_sql_in($val) fixes the issue. Running latest apps and Runway. Just wanted to make you aware of the little bug, I've patched it locally until a fix is rolled out in an update.

Cheers!

Ryan Gittings

Ryan Gittings 1 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That method moved about 5 years ago, so beware. You're in unchartered territory.

Ryan Gittings

Ryan Gittings 1 points
Registered Developer

I'm using the get_by function, I saw PerchCategories_Categories using it, so presumed it was still in use.

Any recommendations here? The actual line I'm using is:

$PerchMembers_Members->get_by('memberID', $members)

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's fine - it's just nothing else is using the option to pass an array by the look of it. As long as you're sure that's what you want to be doing then it's probably ok. Just be aware that that branch is dusty.

Ryan Gittings

Ryan Gittings 1 points
Registered Developer

Gotcha, noted!