diff options
author | Andy Staudacher <andy.st@gmail.com> | 2010-02-02 13:41:50 -0800 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2010-02-02 13:41:50 -0800 |
commit | 31aaf7555f51dd80cf1e97fd3c20a1c245cbf61b (patch) | |
tree | 594ca1cebbe5b8b58b4c50cb3c88487574dba712 /modules/g2_import/helpers/g2_import.php | |
parent | be5f38adea89bdb95be359aea3d97615b6b530a3 (diff) | |
parent | 3c3671cff25f28e21a702b1f665a6baa282d045f (diff) |
Merge commit 'upstream/master'
Diffstat (limited to 'modules/g2_import/helpers/g2_import.php')
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index fa95e547..0fcc0539 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -24,6 +24,7 @@ class g2_import_Core { public static $g2_base_url = null; private static $current_g2_item = null; + private static $error_reporting = null; static function is_configured() { return module::get_var("g2_import", "embed_path"); @@ -931,6 +932,16 @@ class g2_import_Core { "useAuthToken" => false)); return str_replace(self::$g2_base_url, "", $url); } + + static function lower_error_reporting() { + // Gallery 2 was not designed to run in E_STRICT mode and will barf out errors. So dial down + // the error reporting when we make G2 calls. + self::$error_reporting = error_reporting(error_reporting() & ~E_STRICT); + } + + static function restore_error_reporting() { + error_reporting(self::$error_reporting); + } } /** |