2024-04-23 15:14 CEST


Relationship Graph View Issue ] Dependency Graph ]
related to child of duplicate of


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000090Branch 0.2.1-FINALBugpublic2016-11-23 11:26
ReporterQuix0r 
Assigned ToQuix0r 
PriorityhighSeveritymajorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformPHP5-LatestOSLinuxOS Version2.6
Product Version0.2.1-FINAL 
Target Version0.2.1-FINALFixed in Version0.2.1-FINAL 
Summary0000090: Unsaubere Abfragen auf "N" umschreiben auf "Nicht-Y"
DescriptionEs bestehen derzeit einige "unsaubere" Abfragen, ob ein Konfigurationseintrag "N" ist. Dies kann bei z.B. unsauberer Programmierung vorheriger Codes zu Fehlern fuehren, wenn z.B. die Abfrage das Ausfuehren weiterer Codes verhindern soll.

Dies kann z.B. im Code so aussehen:
if (getConfig('bar_entry') == "N") {
  // Do something here and abort
  return;
}

Wenn nun 'bar_entry' nicht vorhanden ist, kommt ein "null". Folglich wird der darauf folgende Code ausgefuehrt, was zu weiteren Fehlern fuehren kann.

Dies sollte nun anders geschrieben werden:
if (getConfig('bar_entry') != "Y") {
  // Do something here and abort
  return;
}

Nun kann "null" als auch "N" zum gewuenschten Abbruch fuehren.



TagsNo tags attached.
Attached Files

-Notes

~0000228

Quix0r (administrator)

Hab nun gleich alle Abfragen umgestellt.

~0000770

Quix0r (administrator)

Und zu damit.
+Notes

-Issue History
Date Modified Username Field Change
2009-02-22 21:29 Quix0r New Issue
2009-02-22 21:29 Quix0r Status new => assigned
2009-02-22 21:29 Quix0r Assigned To => Quix0r
2009-02-22 21:30 Quix0r Projection none => tweak
2009-02-22 21:30 Quix0r ETA none => < 1 day
2009-02-22 21:30 Quix0r Description Updated
2009-02-22 21:41 Quix0r Note Added: 0000228
2009-02-22 21:41 Quix0r Status assigned => resolved
2009-02-22 21:41 Quix0r Fixed in Version => 0.2.1-FINAL
2009-02-22 21:41 Quix0r Resolution open => fixed
2009-02-22 21:42 Quix0r Description Updated
2016-11-23 11:26 Quix0r Note Added: 0000770
2016-11-23 11:26 Quix0r Status resolved => closed
+Issue History