Author: Raymond Bosman
Date: 2006-06-12 15:10:48 +0200 (Mon, 12 Jun 2006)
New Revision: 3122

Log:
- Fixed a bug that an empty 'is null value' string in the database caused a
  PHP warning.
- Fixed a bug in the example of the tutorial.

Modified:
   trunk/DatabaseSchema/ChangeLog
   trunk/DatabaseSchema/docs/tutorial_example_02.php
   trunk/DatabaseSchema/src/handlers/mysql/reader.php

Modified: trunk/DatabaseSchema/ChangeLog
===================================================================
--- trunk/DatabaseSchema/ChangeLog      2006-06-12 12:44:10 UTC (rev 3121)
+++ trunk/DatabaseSchema/ChangeLog      2006-06-12 13:10:48 UTC (rev 3122)
@@ -1,3 +1,6 @@
+- Fixed a bug that an empty 'is null value' string in the database caused a 
+  PHP warning. 
+
 1.0 - Monday 12 June 2006
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

Modified: trunk/DatabaseSchema/docs/tutorial_example_02.php
===================================================================
--- trunk/DatabaseSchema/docs/tutorial_example_02.php   2006-06-12 12:44:10 UTC 
(rev 3121)
+++ trunk/DatabaseSchema/docs/tutorial_example_02.php   2006-06-12 13:10:48 UTC 
(rev 3122)
@@ -2,11 +2,11 @@
 require 'tutorial_autoload.php';
 
 // save a database schema to an XML file:
-$schema->saveToFile( 'array', 'saved-schema.php' );
+$schema->writeToFile( 'array', 'saved-schema.php' );
 
 // create a database from a database schema:
 $db = ezcDbFactory::create( 'mysql://user:[EMAIL PROTECTED]/database' );
-$schema->saveToDb( $db );
+$schema->writeToDb( $db );
 
 // create SQL DDL for a specific database and echo it:
 $db = ezcDbFactory::create( 'mysql://user:[EMAIL PROTECTED]/database' );

Modified: trunk/DatabaseSchema/src/handlers/mysql/reader.php
===================================================================
--- trunk/DatabaseSchema/src/handlers/mysql/reader.php  2006-06-12 12:44:10 UTC 
(rev 3121)
+++ trunk/DatabaseSchema/src/handlers/mysql/reader.php  2006-06-12 13:10:48 UTC 
(rev 3122)
@@ -135,7 +135,7 @@
             }
 
             $fieldNotNull = false;
-            if ( $row['null'][0] != 'Y' )
+            if ( strlen( $row['null'] ) == 0 || $row['null'][0] != 'Y' )
             {
                 $fieldNotNull = true;
             }

-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to