Hello,
I see the following snippet in almost every file of phpMyAdmin, but I believe that in most files it is not required.
if (! defined('PHPMYADMIN')) { exit; }
I think that it was used to prevent execution if a direct request was made to the file, but nowadays, most files contain only procedural code. In most cases, with or without this, the code behaves the same so it may be considered dead code.
I propose removing it where possible. What is your opinion?
Best regards, Dan Ungureanu
Le 2015-08-01 16:10, Dan Ungureanu a écrit :
Hello,
I see the following snippet in almost every file of phpMyAdmin, but I believe that in most files it is not required.
if (! defined('PHPMYADMIN')) { exit; }
I think that it was used to prevent execution if a direct request was made to the file, but nowadays, most files contain only procedural code. In most cases, with or without this, the code behaves the same so it may be considered dead code.
I propose removing it where possible. What is your opinion?
Best regards, Dan Ungureanu
I agree that if the file only contains functions and classes, there is no point having this snippet, but I may be missing something.