- if (isset($obj)) {
- foreach (array_keys($obj) as $key) {
- # FIXME: we would want something like \Q and \E here...
- if (preg_match('/^' . $tag . '\/(.*)$/', $key, $matches) ||
- (isset($id) && preg_match('/^#' . $id . '\/(.*)$/', $key, $matches))) {
- $child->set_attribute($matches[1], $obj[$key]);
- }
+ foreach (array_keys($obj) as $key) {
+ # FIXME: we would want something like \Q and \E here...
+ if (preg_match('/^' . $tag . '\/(.*)$/', $key, $matches) ||
+ (isset($id) && preg_match('/^#' . $id . '\/(.*)$/', $key, $matches))) {
+ $child->set_attribute($matches[1], $obj[$key]);
+ }