]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
python proxy: Avoid utf-8 related crash. Thanks, Antoine Beaupré
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index 0380bec3d6cd9948ec92229117ea3655212af59a..123dfd36489c8536450971c95267ef30261abcc9 100644 (file)
@@ -391,7 +391,9 @@ sub preprocess_inline (@) {
                                        blind_cache => 1);
                        };
                        if ($@) {
                                        blind_cache => 1);
                        };
                        if ($@) {
-                               error sprintf(gettext("failed to process template %s"), $params{template}.".tmpl").": $@";
+                               # gettext can clobber $@
+                               my $error = $@;
+                               error sprintf(gettext("failed to process template %s"), $params{template}.".tmpl").": $error";
                        }
                }
                my $needcontent=$raw || (!($archive && $quick) && $template->query(name => 'content'));
                        }
                }
                my $needcontent=$raw || (!($archive && $quick) && $template->query(name => 'content'));