Re: Seg fault in PHP (FormsAPI)? Can you reproduce?
You guys do not read the various documentation despite lots of efforts went creating them. Have you read the form API reference where about every fifth line is a warning about missing # signs? I won't look up the PHP manual page where it mentions that if you omit a key then the key is actually 0 and obviously 0 is not something that begins with #. Also, core does not babysit broken code. But sometimes developers need a crutch. It's provided for quite some time at http://drupal.org/node/58355 .
Charlie, While I'm as quick as anybody to say RTFM, YDDB (You Dear Developer Bastard) to developers with um, Dear Developer Questions, there are three issues here that would help deal with this: * The docs on Forms actually *could* be easier to find and navigate. AFAIK, there isn't a "developer's FAQ". (and if there is: it's not that well known, or I wouldn't be writing this, ja?). This is a good one for such a doc. * Like it or not, APIs are always abused, either through carelessness or ignorance. It's a motherhood in software engineering: any function or procedure needs to deal gracefully with bad input. And there are many very good procedures (see: invariants) to test for bad input. Generally, forms are not processed multiple times in a request, and if we can add code to form.inc to catch this, it will make the whole system more predictable. * Good "form debugging" tools aren't really available yet, or are not that well known to some of us doing 4.7 development. The arrays created for Forms API are generally static, and I've found that there are a variety of ways of detecting "bad data". A "forms validate" API could be called via devel.module or in debugging code, and would make these kind of bugs a lot more transparent. Yellin' at us dumb developers has its satisfactions, and you've earned the right to do it more than most of us. But if the goal is to reduce this type of developer problem, there just might be a technological solution here :-) Rob Karoly Negyesi wrote:
You guys do not read the various documentation despite lots of efforts went creating them.
Have you read the form API reference where about every fifth line is a warning about missing # signs? I won't look up the PHP manual page where it mentions that if you omit a key then the key is actually 0 and obviously 0 is not something that begins with #.
Also, core does not babysit broken code. But sometimes developers need a crutch. It's provided for quite some time at http://drupal.org/node/58355 .
participants (2)
-
Karoly Negyesi -
Rob Thorne