Skip to content
Browse files

Use typehint instead of throwing ourselves

  • Loading branch information...
flack committed Jul 26, 2019
1 parent e42b8ed commit 108973f1c807b55050c659cd55efc4cc91641421
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/midcom/helper/imagefilter.php
@@ -315,12 +315,8 @@ private function _process_tempfile($tmpname)
* @param string $command The name of the callback to execute
* @param array $args The arguments passed to the callback
private function execute_user_callback($command, $args)
private function execute_user_callback(callable $command, $args)
if (!is_callable($command)) {
throw new midcom_error("The function {$command} could not be found");
$tmpfile = $this->_get_tempfile();
if (!call_user_func($command, $this->_filename, $tmpfile, $args)) {

0 comments on commit 108973f

Please sign in to comment.
You can’t perform that action at this time.