Skip to content

Commit

Permalink
Fixed issue with undefined array element.
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Jun 1, 2015
1 parent 055ea38 commit eb210c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions html/docs/include/basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ function add_links( $text )
$text = preg_replace_callback(
'/\[FEAT:([^\]]*?)(#.*)?\]/',
function($matches) {
if (!array_key_exists(2, $matches)) {
$matches[2] = '';
}
return "<a href='/docs/{$matches[1]}{$matches[2]}'>". $GLOBALS['features'][$matches[1]][0] . '</a>';
},
$text
Expand Down

0 comments on commit eb210c4

Please sign in to comment.