Skip to content

Commit

Permalink
graph: use filter_var instead of filter_input to allow overriding GET…
Browse files Browse the repository at this point in the history
… from detail.php

In detail.php $_GET['x'] and $_GET['y'] are overridden. filter_input
takes the original values. This results in NULL values.
  • Loading branch information
pommi committed Jul 21, 2014
1 parent 90c2c54 commit b6ff5ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

$plugin = validate_get(GET('p'), 'plugin');
$type = validate_get(GET('t'), 'type');
$width = GET('x') ? filter_input(INPUT_GET, 'x', FILTER_VALIDATE_INT, array(
$width = GET('x') ? filter_var(GET('x'), FILTER_VALIDATE_INT, array(
'min_range' => 10,
'max_range' => $CONFIG['max-width']
)) : $CONFIG['width'];
$height = GET('y') ? filter_input(INPUT_GET, 'y', FILTER_VALIDATE_INT, array(
$height = GET('y') ? filter_var(GET('y'), FILTER_VALIDATE_INT, array(
'min_range' => 10,
'max_range' => $CONFIG['max-height']
)) : $CONFIG['height'];
Expand Down

0 comments on commit b6ff5ed

Please sign in to comment.