Fixes PHP Notice: Undefined index: args in /home/ki/Projects/mediawiki/
core/includes/Exception.php on line 755 when running code from
maintenance/eval.php .
Change-Id: Ic4a806232aadae0a60f5bc06de1604d9c5996e6f
$finalExceptionText .= $call['function'];
}
$args = array();
$finalExceptionText .= $call['function'];
}
$args = array();
- foreach ( $call['args'] as $arg ) {
- if ( is_object( $arg ) ) {
- $args[] = 'Object(' . get_class( $arg ) . ')';
- } elseif( is_array( $arg ) ) {
- $args[] = 'Array';
- } else {
- $args[] = var_export( $arg, true );
+ if ( isset( $call['args'] ) ) {
+ foreach ( $call['args'] as $arg ) {
+ if ( is_object( $arg ) ) {
+ $args[] = 'Object(' . get_class( $arg ) . ')';
+ } elseif( is_array( $arg ) ) {
+ $args[] = 'Array';
+ } else {
+ $args[] = var_export( $arg, true );
+ }
}
}
$finalExceptionText .= '(' . implode( ', ', $args ) . ")\n";
}
}
$finalExceptionText .= '(' . implode( ', ', $args ) . ")\n";