Skip to content

Instantly share code, notes, and snippets.

Created April 20, 2013 19:43
Show Gist options
  • Save anonymous/5427135 to your computer and use it in GitHub Desktop.
Save anonymous/5427135 to your computer and use it in GitHub Desktop.
undefined indexes & var
//sid.php (indexy)
if($SID["_MSG_ARRAY"]) foreach ( $SID["_MSG_ARRAY"] as $m ) $SID["MESSAGES"] .= $m;
if($SID["_ERR_ARRAY"]) foreach ( $SID["_ERR_ARRAY"] as $m ) $SID["ERRORS"] .= $m;
if($SID["_CON_ARRAY"]) foreach ( $SID["_CON_ARRAY"] as $m ) $SID["CONTENT"] .= $m;
//sid.php (variable)
if($select_flag) {
if($sth) select_results($sth);
else message('Empty result');
} else {
$elapsed_time = microtime(TRUE) - $SID['query_start_time'];
if($multistmt_flag)
message("$stmt_count statements executed.");
else
message("Statement affected " . $sth->rowCount() . " row(s) in " . number_format($elapsed_time * 1000, 2) . " milliseconds.");
}
}
//main.php (indexy)
<?php echo $SID["MESSAGES"] ?><?php echo $SID["ERRORS"] ?>
<?php echo $SID["CONTENT"] ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment