diff --git a/AUTHORS.txt b/AUTHORS.txt index 43223bd10..f9fdff973 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -131,4 +131,5 @@ Chris Faulkner Elijah Manor Daniel Chatfield Nikita Govorov -Mike Pennisi \ No newline at end of file +Mike Pennisi +Markus Staab \ No newline at end of file diff --git a/test/polluted.php b/test/polluted.php index 54b52d20d..31a77c361 100644 --- a/test/polluted.php +++ b/test/polluted.php @@ -42,11 +42,22 @@ if( count($_POST) ) { $includes = array(); foreach( $_POST as $name => $ver ){ + if ( empty( $libraries[ $name ] )) { + echo "unsupported library ". $name; + exit; + } + $url = $libraries[ $name ][ "url" ]; if( $name == "YUI" && $ver[0] == "2" ) { - $url = str_replace( "/yui", "/yuiloader", $url, $count = 2 ); + $url = str_replace( "/yui", "/yuiloader", $url); } - $include = "\n"; + + if ( empty( $libraries[ $name ][ "versions" ][ $ver ] )) { + echo "library ". $name ." not supported in version ". $ver; + exit; + } + + $include = "\n"; if( $lib == "prototype" ) { // prototype must be included first array_unshift( $includes, $include ); } else {