array intersect Object of class ... could not be converted to string

array_intersect -- Ошибка Object of class ... could not be converted to string или Array to string conversion

Ошибка возникает при использовании функции array_intersect(), вычисляющей схождение массивов.
Использую так (передаю массивы объектов):

$result = array_intersect($someSales, $otherSales);

Текст ошибки:

Error: Object of class Sale could not be converted to string

Если передавать не массив объектов, а массив массивов, то ошибка такая:

Notice: Array to string conversion

Subscribe to RSS - array intersect Object of class ... could not be converted to string