]> git.sesse.net Git - xml-template/commitdiff
Fix attributes in PHP.
authorsgunderson@bigfoot.com <>
Fri, 11 Aug 2006 23:47:20 +0000 (01:47 +0200)
committersgunderson@bigfoot.com <>
Fri, 11 Aug 2006 23:47:20 +0000 (01:47 +0200)
xml-template.php

index 8bbcd659bfe297239d3210203a5d4b86aa90dcaa..5c3d2b492e85f045d0e4eab6125c3895104515db 100644 (file)
@@ -40,7 +40,7 @@ function XML_Template_process($node, $obj, $clean = 1)
                                        # FIXME: we would want something like \Q and \E here...
                                        if (preg_match('/^' . $tag . '\.(.*)$/', $key, $matches) ||
                                            ($id != null && preg_match('/^#' . $id . '\.(.*)$/', $key, $matches))) {
-                                               $child->set_attribute($matches[0], $obj[$key]);
+                                               $child->set_attribute($matches[1], $obj[$key]);
                                        }
 
                                        if ($processed) {