Opened 3 years ago

Closed 3 years ago

#1607 closed Bug/Fehler (fixed)

E-Warning Banner Manager

Reported by: FräuleinGarn Owned by: somebody
Priority: normal Milestone: modified-shop-2.0.5.0
Component: Admin Version: 2.0.4.2

Description

Weiß leider nicht mehr, wie ich den Fehler erzeugt habe.

Warnmeldung

E_WARNING	: LoggingManager: unlink(/var/www/vhosts/meinshop/images/banner/): Is a directory in File: /var/www/vhosts/meinshop/admin/banner_manager.php on Line: 84

Sollte es in der Datei statt

// new banner available & delete old
        if (is_object($banners_image) && $banners_image->filename != '') {
          $banners_image_exist = $banners_image->filename;
          $banner_query = xtc_db_query("SELECT banners_image 
                                          FROM " . TABLE_BANNERS . " 
                                         WHERE banners_id = '" . (int)$banners_id . "'");
          $banner = xtc_db_fetch_array($banner_query);
          $image_location = DIR_FS_CATALOG_IMAGES . 'banner/'.$banner['banners_image'];
          if (file_exists($image_location)) {
            @unlink($image_location);

nicht

// new banner available & delete old
        if (is_object($banners_image) && $banners_image->filename != '') {
          $banners_image_exist = $banners_image->filename;
          $banner_query = xtc_db_query("SELECT banners_image 
                                          FROM " . TABLE_BANNERS . " 
                                         WHERE banners_id = '" . (int)$banners_id . "'");
          $banner = xtc_db_fetch_array($banner_query);
          $image_location = DIR_FS_CATALOG_IMAGES . 'banner/'.$banner['banners_image'];
          if (is_file($image_location)) {
            @unlink($image_location);

heißen? Also is_file statt file_exist.

Zusätzlich könnte man auch ändern, dass der gesamte Block in Zeile 76-86 nur ausgeführt wird, wenn die action 'insert' ist und nicht auch bei 'update'.

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by Tomcraft

Ich habe zwar keine Idee wie du die Meldung erzeugt hast, aber mit is_file sollte das nicht mehr passieren, denn nur file_exists prüft auch auf Verzeichnisse und nicht nur Dateien.

comment:2 Changed 3 years ago by FräuleinGarn

Ich kann's leider auch nicht mehr nachstellen.

Das steht im log zu genau dieser Zeit. Vielleicht hilft das.

31.17.129.248 - - [10/Mar/2019:19:00:34 +0100] "POST /admin/banner_manager.php?action=insert HTTP/1.0" 302 611 "https://www.meinshop.de/admin/banner_manager.php?action=new" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15"
31.17.129.248 - - [10/Mar/2019:19:00:34 +0100] "GET /admin/banner_manager.php?page=&bID=32 HTTP/1.0" 200 7772 "https://www.meinshop.de/admin/banner_manager.php?action=new" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15"
31.17.129.248 - - [10/Mar/2019:19:00:34 +0100] "GET /images/banner/Captainwalrusjerseygrau.jpg HTTP/1.0" 200 526 "https://www.meinshop.de/admin/banner_manager.php?page=&bID=32" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15"
31.17.129.248 - - [10/Mar/2019:19:00:34 +0100] "GET /admin/images/graphs/banner_infobox-32.png HTTP/1.0" 200 1233 "https://www.meinshop.de/admin/banner_manager.php?page=&bID=32" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15"
31.17.129.248 - - [10/Mar/2019:19:00:34 +0100] "GET /admin/amz_configuration.php?ajax=1&action=shippingCapture HTTP/1.0" 200 532 "https://www.meinshop.de/admin/banner_manager.php?page=&bID=32" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15"
31.17.129.248 - - [10/Mar/2019:19:00:34 +0100] "GET /favicon.ico HTTP/1.0" 404 8660 "https://www.meinshop.de/admin/banner_manager.php?page=&bID=32" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15"

comment:3 Changed 3 years ago by GTB

  • Resolution set to fixed
  • Status changed from new to closed

In 11676:

fix #1607

Add Comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.