]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-21198 fixed silly regression in type checking - grrr
authorPetr Skoda <skodak@moodle.org>
Sun, 3 Jan 2010 20:49:30 +0000 (20:49 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 3 Jan 2010 20:49:30 +0000 (20:49 +0000)
lib/outputrenderers.php

index dc4bce5cfc8bd11df7ae152490281f002cffe84f..4e132f329f73d033f8f67f1d65a18a3f8169132a 100644 (file)
@@ -1009,7 +1009,7 @@ class core_renderer extends renderer_base {
             if (func_num_args() > 1) {
                 debugging('html_form instance used as first parameter of $OUTPUT->single_button(), all other parameters are ignored.');
             }
-        } else if ($url_or_singlebutton instanceof single_button or is_string($url_or_singlebutton)) {
+        } else if ($url_or_singlebutton instanceof moodle_url or is_string($url_or_singlebutton)) {
             $button = new single_button($url_or_singlebutton, $label, $method, $options);
         } else {
             throw new coding_exception('The $$url_or_singlebutton param to $OUTPUT->single_button() must be either a URL (string/moodle_url) or a single_button instance.');