Opened 4 years ago

Closed 4 years ago

#1488 closed Bug/Fehler (fixed)

Bug in Payone-Config

Reported by: noRiddle Owned by: somebody
Priority: normal Milestone: modified-shop-2.0.5.0
Component: Admin Version: 2.0.4.0

Description

In /admin/payone_config.php wird eine Spalte zu einer DB-Tabelle hinzugefügt mittels folgender Abfrage:

// check new column
$check_query = xtc_db_query("SELECT *
                               FROM payone_transactions
                              LIMIT 1");
$check = xtc_db_fetch_array($check_query);
if (!isset($check['type'])) {
  xtc_db_query("ALTER TABLE payone_transactions ADD type varchar(64) NOT NULL");
}

Das halte ich für äußerst heikel. Die Abfrage sollte per

SHOW COLUMNS FROM payone_transactions

erfolgen.
Was nämlich, wenn es noch keine Zeile in der Tabelle gibt, sie also leer ist ?

Dazu hier in diesem Thread ein User mit einer Fehlermeldung diesbezüglich.

Gruß,
noRiddle

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by Tomcraft

  • Milestone set to modified-shop-2.0.5.0
  • Reporter changed from anonymous to noRiddle
  • Version set to 2.0.4.0

comment:2 Changed 4 years ago by GTB

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

In 11331:

fix #1488

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.