Skip to content

Commit

Permalink
Add some logical assertions for variables being set
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-pike committed Dec 22, 2023
1 parent 58f8110 commit 61a28ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bindzonefile.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public function parse_into_rrsets(Zone $zone, $comment_handling) {
$line_number++;
$line = rtrim($line);
if($continuation) {
assert(isset($comment));
assert(isset($content_parsed));
try {
list($content_parsed, $more_comment, $continuation) = $this->parse_content(trim($line), $type, $content_parsed);
$comment .= " $more_comment";
Expand Down Expand Up @@ -223,6 +225,7 @@ private function parse_content($input, $type, $content = array()) {
if($in_comment) {
$comment .= $char;
} elseif($in_string) {
assert(isset($string));
if($escape) {
$string .= $char;
$escape = false;
Expand Down

0 comments on commit 61a28ef

Please sign in to comment.