Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Edit: 7 days ago phpMyAdmin switched over to using Git as it's version control system, which was the goal of this fork. Project success. :) *Discontinued: as I now prefer to use PostgreSQL for anything I can and stick to using local client applications to interface with MySQL, which are usually much better than phpmyadmin* A Git fork of the late…
PHP JavaScript Other
branch: master
3 comments

Removing all use of error suppression (the @ symbol or "Error Control…

… Operators" as it

is called they are called in the PHP manual) in the phpmyadmin codebase.

I have already posted my reasoning in the php manual (also reprinted below) as to why
having this in php code is a very bad idea:

http://www.php.net/manual/en/language.operators.errorcontrol.php#90987
==========
Error suppression should be avoided if possible as it doesn't just suppress the error that
you are trying to stop, but will also suppress errors that you didn't predict would ever
occur. This will make debugging a nightmare.

It is far better to test for the condition that you know will cause an error before preceding
to run the code. This way only the error that you know about will be suppressed and not
all future errors associated with that piece of code.

There may be a good reason for using outright error suppression in favor of the method I
have suggested, however in the many years I've spent programming web apps I've yet to
come across a situation where it was a good solution. The examples given on this manual
page are certainly not situations where the error control operator should be used.
==========

This situation is quite bad in phpmyadmin as it is used all throughout the codebase and
without documentation as to why the supression was added. It appears though that many
of the places where it was used was not just ignorance of the better method, but was flat
out laziness because the person writing the code didn't wish to do propper error checking
and instead just decided to hide errors.

The complete missuse of error supression in areas where it was just down to lazy
programming and the lack of documentation of why it was used in other areas has lead me
to not trust it's inclusion anywhere was for a good reason. Because of this I have  just
completely removed all supression and not even attempted to address any issue it may have
been hiding. These issues will be much better addressed one at a time as they are discovered
from use of the code base since unhiding of the errors.
latest commit 699619f0cf
Gerry authored
Failed to load latest commit information.
contrib
js Initial commit of phpMyAdmin-3.1.4-all-languages.
lang Initial commit of phpMyAdmin-3.1.4-all-languages.
libraries
pmd
scripts
setup
themes Initial commit of phpMyAdmin-3.1.4-all-languages.
CREDITS Initial commit of phpMyAdmin-3.1.4-all-languages.
ChangeLog
Documentation.html
Documentation.txt Initial commit of phpMyAdmin-3.1.4-all-languages.
INSTALL Initial commit of phpMyAdmin-3.1.4-all-languages.
LICENSE
README
README.PHPMYADMIN
README.VENDOR Initial commit of phpMyAdmin-3.1.4-all-languages.
README~
RELEASE-DATE-3.1.4
TODO
browse_foreigners.php
bs_change_mime_type.php
bs_disp_as_mime_type.php
bs_play_media.php Initial commit of phpMyAdmin-3.1.4-all-languages.
calendar.php
changelog.php
chk_rel.php
config.sample.inc.php
db_create.php
db_datadict.php Initial commit of phpMyAdmin-3.1.4-all-languages.
db_export.php Initial commit of phpMyAdmin-3.1.4-all-languages.
db_import.php Initial commit of phpMyAdmin-3.1.4-all-languages.
db_operations.php
db_printview.php
db_qbe.php
db_search.php Initial commit of phpMyAdmin-3.1.4-all-languages.
db_sql.php
db_structure.php
docs.css
error.php Initial commit of phpMyAdmin-3.1.4-all-languages.
export.php
favicon.ico
import.php Removing all use of error suppression (the @ symbol or "Error Control…
index.php Initial commit of phpMyAdmin-3.1.4-all-languages.
license.php Initial commit of phpMyAdmin-3.1.4-all-languages.
main.php
navigation.php
pdf_pages.php
pdf_schema.php
phpinfo.php
phpmyadmin.css.php Removing all use of error suppression (the @ symbol or "Error Control…
pmd_common.php Removing all use of error suppression (the @ symbol or "Error Control…
pmd_display_field.php
pmd_general.php
pmd_help.php Initial commit of phpMyAdmin-3.1.4-all-languages.
pmd_pdf.php
pmd_relation_new.php Initial commit of phpMyAdmin-3.1.4-all-languages.
pmd_relation_upd.php
pmd_save_pos.php
print.css
querywindow.php
readme.php Initial commit of phpMyAdmin-3.1.4-all-languages.
robots.txt
server_binlog.php
server_collations.php Initial commit of phpMyAdmin-3.1.4-all-languages.
server_databases.php Initial commit of phpMyAdmin-3.1.4-all-languages.
server_engines.php
server_export.php Initial commit of phpMyAdmin-3.1.4-all-languages.
server_import.php Initial commit of phpMyAdmin-3.1.4-all-languages.
server_privileges.php
server_processlist.php
server_sql.php
server_status.php
server_variables.php
show_config_errors.php Initial commit of phpMyAdmin-3.1.4-all-languages.
sql.php Removing all use of error suppression (the @ symbol or "Error Control…
tbl_addfield.php Initial commit of phpMyAdmin-3.1.4-all-languages.
tbl_alter.php Initial commit of phpMyAdmin-3.1.4-all-languages.
tbl_change.php Initial commit of phpMyAdmin-3.1.4-all-languages.
tbl_create.php
tbl_export.php
tbl_import.php Initial commit of phpMyAdmin-3.1.4-all-languages.
tbl_indexes.php Initial commit of phpMyAdmin-3.1.4-all-languages.
tbl_move_copy.php
tbl_operations.php Initial commit of phpMyAdmin-3.1.4-all-languages.
tbl_printview.php Initial commit of phpMyAdmin-3.1.4-all-languages.
tbl_relation.php
tbl_replace.php Removing all use of error suppression (the @ symbol or "Error Control…
tbl_row_action.php
tbl_select.php
tbl_sql.php
tbl_structure.php Initial commit of phpMyAdmin-3.1.4-all-languages.
themes.php
transformation_overview.php
transformation_wrapper.php
translators.html Initial commit of phpMyAdmin-3.1.4-all-languages.
user_password.php
view_create.php
webapp.php

README

phpmyadmin_GitHubed (yes the single 'b' is on purpose)
A Git fork of the latest stable version of phpmyadmin (3.1.4) to move development effort below the "pita-threshold"

The problem:
As a programmer when I find a bug or usability problem with some open source software I'm using, I find it's often quicker and easier to fix the problem myself than it is to submit a bug to get it fixed. There is several reasons for this:
- because you're the one experiencing the issue your motivation to have it fixed is higher than it would be for a developer on that open source project who is not experiencing the issue. This makes you more likely to work on it straight away, however if you were to submit a bug you will more than likely have an ordeal just convincing the developer that the problem exists, let alone that they should work on it any time soon (or ever!).
- the process of submitting the bug requires you to investigate the problem anyway, so why not just fix it while you're there.
- filling out bug form alone usually takes way too much time and you've got to get an account where ever that team has decided to host their bug tracker.
- going though the bug reporting process often requires you to be diplomatic as developers generally don't like being told there is a problem with their project.
- if no developers are around to address your issue or it's not of interest to the ones that are around, then you may find yourself waiting for months or even years before there is even a reply (if ever). So if it's something you need fixed urgently, you have effectively wasted time filling out the bug report.
- you are at the mercy of the developers, they may decide that you're bug is invalid and then close the bug, not even giving you a chance to respond. This happened to me once happened to me on the PHP bug tracker, I believed the bug was still valid and that the person who closed it had misunderstood my report, but I was informed by the bug system that I could not make a further comment as the issue was closed (they may have changed the system now, I'm not sure, but I've seen happen on other bug trackers).
- chances are even if somebody fixes it for you, they will misunderstand the request in some way or end up doing a half ass job, which will no doubt end up with you having to lodge another bug repeating the process.

The solution:
Git is a distributed version control system and GitHub allows anybody to fork anything, make fixes, publish it for everybody to use and then tell the original developers about your changes. Not just open source but also OPEN DEVELOPMENT, no permission or hassle necessary! The original devs can then work out the damn politics and complicated issue tracking system. =D

It is for this reason that I think every open source project should be using an open development system, such as that provided by Git and GitHub. If you don't, you're just missing out one help from the majority of developers who just can't be bothered to jump though all your hoops. (see http://wiki.dandascalescu.com/essays/pita-threshold for more info).

Get to phpmyadmin already!:
OK so phpmyadmin is used quite a lot across the world, but like the majority of open source projects out there it's open source but closed development. It's way too hard to get your changes from your hard drive to the main project, so you don't bother and you end up just keeping those changes to yourself, which is not the point of open source. I personally believe that this is quite a significant problem for phpmyadmin, because while the bulk of it's code seems pretty good, I hate it and think as a whole it's god damn awful and I'm sure I'm not the only one who thinks this. This however really just comes down to very small issues which affect me every time I use the app, tiny usability issues or bugs that really get on my nerves over time. There is so many of these issues and they are each so small and considered by some to be too subjective (how convenient), unimportant or falling into the "works for me" category. These are the sort of bugs/issues that people fix for themselves and then never submit. It would make phpmyadmin so much better if they were fixed publicly, but with closed development they probably never will be.

So that's what I'm trying to do here, I'm initiating open development of phpmyadmin to the masses. I in no way wish to take over the phpmyadmin project or think that I have the time to fix more than a handful of the usability issues I spoke of (generically). Instead I'm doing in the hope that it will give everybody like me an opportunity to commit their fixes to the project in a very easy fashion. At the same time I hope it demonstrates to the phpmyadmin project (and other open source teams) the advantages of development though an open system such as Git and GitHub, over what they are currently doing.

So in conclusion... PLEASE FORK ME
Something went wrong with that request. Please try again.