4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Sunny C. on September 14, 2013, 05:56:55 AM

Title: Double $$ / Doppelte $$ - Bug 4images ?
Post by: Sunny C. on September 14, 2013, 05:56:55 AM
Hallo zusammen,

mir ist gerade aufgefallen in der Version 1.7.11
admin_functions.php
function show_num_select_row($title, $option, $desc = "") {
  global $site_sess, $PHP_SELF, $action, $$option;
  echo "<tr class=\"".get_row_bg()."\">\n<td><p>".$title."</p></td>\n";
  echo "<td align=\"right\"><p>".$desc;
  $url = $PHP_SELF;
  $url .= preg_match("/\?/", $url) ? "&amp;" : "?";
  $url .= "action=".$action;
  $url = $site_sess->url($url);
  echo "<select name=\"num\" onchange=\"window.location=('".$url."&";
  echo $option."='+this.options[this.selectedIndex].value)\">\n";
  for ($i = 1; $i < 11; $i++) {
    echo "<option value=\"$i\"";
    if ($i == ${$option}) {
      echo " selected";
    }
    echo ">".$i."</option>\n";
  }
  echo "</select></p></td>\n</tr>\n";
}
Folgendes ist angegeben:
  global $site_sess, $PHP_SELF, $action, $$option;
$$option;
$$option;
Ist da nicht ein $ zu viel?

Das ist aus einer aktuellen "frischen" 4images Installation.
Es wurden noch keine Modifizierungen vorgenommen.
Sollte das so sein, sollte man die User offiziell darauf Aufmerksam machen.
Title: Re: Double $$ / Doppelte $$ - Bug 4images ?
Post by: Rembrandt on September 14, 2013, 06:19:58 AM
Hi!

Nein, das ist eine variable Variable.

mfg Andi
Title: Re: Double $$ / Doppelte $$ - Bug 4images ?
Post by: Sunny C. on September 14, 2013, 06:31:31 AM
Achsooo.
Ok, vielen Dank für die Info.