Errata

Wicked Cool PHP

Errata for Wicked Cool PHP

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
53
paragraph "putting it all together"

The example regex
/<a\s+[^>]*href="[^"]+"/i
does not match the beginning of a hyperlink as expected.
The following link matches it although it is invalid:
<a hhhhhref="b.php">blah</a>
Better regex would be:
/<a\s+[^>]*\shref="[^"]+"/i

Anonymous  May 21, 2010 
PDF Page 57
1st paragraph

When I use the following code snippet

--------CODE------------
public function isEmail($email)
{
// Checks for proper email format
if (! preg_match( '/^[A-Za-z0-9!#$%&\'*+-/=?^_`{|}~]+@[A-Za-z0-9-]+(\.[AZa-z0-9-]+)+[A-Za-z]$/', $email)) {
return false;
} else {
return true;
}
}
---------------------------------
I got the following error

-------ERROR--------------
Warning: preg_match() [function.preg-match]: Unknown modifier '=' in D:\xampp\htdocs\writer\admin\classes\validator.class.php on line 9
-----------------------------

rashidul  Aug 02, 2010 
Printed Page 94
United States

Page 94 in list of fopen() modes, "a-" is printed rather than "a".

thomas hibbard  Nov 17, 2011