return;
# Or we could throw an exception:
# throw new MWException( __METHOD__ . ' called without any data (mode empty).' );
}
return;
# Or we could throw an exception:
# throw new MWException( __METHOD__ . ' called without any data (mode empty).' );
}
* BEWARE! Data are passed as they have been supplied by the user,
* they should be carefully handled in the function processing the
* request.
* BEWARE! Data are passed as they have been supplied by the user,
* they should be carefully handled in the function processing the
* request.
wfHttpError(
403,
'Forbidden',
'You are not allowed to view pages.' );
} else {
wfDebug( __METHOD__ . ' dispatching ' . $this->func_name . "\n" );
wfHttpError(
403,
'Forbidden',
'You are not allowed to view pages.' );
} else {
wfDebug( __METHOD__ . ' dispatching ' . $this->func_name . "\n" );
try {
$result = call_user_func_array( $this->func_name, $this->args );
if ( $result === false || $result === null ) {
try {
$result = call_user_func_array( $this->func_name, $this->args );
if ( $result === false || $result === null ) {
- wfDebug( __METHOD__ . ' ERROR while dispatching '
- . $this->func_name . "(" . var_export( $this->args, true ) . "): "
- . "no data returned\n" );
+ wfDebug( __METHOD__ . ' ERROR while dispatching ' .
+ $this->func_name . "(" . var_export( $this->args, true ) . "): " .
+ "no data returned\n" );
wfHttpError( 500, 'Internal Error',
"{$this->func_name} returned no data" );
wfHttpError( 500, 'Internal Error',
"{$this->func_name} returned no data" );
$result->sendHeaders();
$result->printText();
wfDebug( __METHOD__ . ' dispatch complete for ' . $this->func_name . "\n" );
}
} catch ( Exception $e ) {
$result->sendHeaders();
$result->printText();
wfDebug( __METHOD__ . ' dispatch complete for ' . $this->func_name . "\n" );
}
} catch ( Exception $e ) {
- wfDebug( __METHOD__ . ' ERROR while dispatching '
- . $this->func_name . "(" . var_export( $this->args, true ) . "): "
- . get_class( $e ) . ": " . $e->getMessage() . "\n" );
+ wfDebug( __METHOD__ . ' ERROR while dispatching ' .
+ $this->func_name . "(" . var_export( $this->args, true ) . "): " .
+ get_class( $e ) . ": " . $e->getMessage() . "\n" );