Permalink
Browse files

avoid PHP Notice when [1] isn't set

  • Loading branch information...
1 parent c5092ff commit 7d238dcf8c2cf7045a14aa1a6e4e080d33d3ebca Chuck Burgess committed Sep 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Beautifier/Tokenizer.php
View
@@ -315,7 +315,7 @@ function _handleXMLDefault($data)
*/
$regs = array();
preg_match("/<!--(.+)-->/i", $data, $regs);
- $comment = trim($regs[1]);
+ $comment = isset($regs[1]) ? trim($regs[1]) : '';
$struct = array(
"type" => XML_BEAUTIFIER_COMMENT,

0 comments on commit 7d238dc

Please sign in to comment.