billw2 / pikrellcam

Raspberry Pi motion vector detection program with OSD web interface.
GNU General Public License v3.0
262 stars 70 forks source link

Function create_function() is deprecated #41

Closed Egregius closed 5 years ago

Egregius commented 5 years ago

Hi,

The create_function() is deprecated since PHP 7.2. Can you use something else please? It's used in this line of media-archive: usort($media_array, create_function('$a, $b','return strcmp($a["mtime"], $b["mtime"]);'));

Thanks!

Egregius commented 5 years ago

I searched a bit around. I guess that this could be a fix: usort($media_array, function($a, $b) {return strcmp($a["mtime"], $b["mtime"]);});

Can you verify please and submit?

Thanks.

Egregius commented 5 years ago

Thank you :)