Index: includes/unicode.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/unicode.inc,v
retrieving revision 1.37
diff -u -p -r1.37 unicode.inc
--- includes/unicode.inc	2 Jan 2009 22:09:53 -0000	1.37
+++ includes/unicode.inc	23 May 2009 23:02:13 -0000
@@ -207,7 +207,9 @@ function drupal_truncate_bytes($string, 
   if ((ord($string[$len]) < 0x80) || (ord($string[$len]) >= 0xC0)) {
     return substr($string, 0, $len);
   }
-  while (--$len >= 0 && ord($string[$len]) >= 0x80 && ord($string[$len]) < 0xC0) {};
+  // Scan backwards to beginning of the byte sequence. 
+  while (--$len >= 0 && ord($string[$len]) >= 0x80 && ord($string[$len]) < 0xC0);
+
   return substr($string, 0, $len);
 }
 
Index: modules/dblog/dblog.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.test,v
retrieving revision 1.18
diff -u -p -r1.18 dblog.test
--- modules/dblog/dblog.test	13 Apr 2009 08:48:59 -0000	1.18
+++ modules/dblog/dblog.test	23 May 2009 23:02:13 -0000
@@ -189,7 +189,7 @@ class DBLogTestCase extends DrupalWebTes
     $this->assertResponse(200);
     // Retrieve user object.
     $user = user_load_by_name($name);
-    $this->assertTrue($user != null, t('User @name was loaded', array('@name' => $name)));
+    $this->assertTrue($user != NULL, t('User @name was loaded', array('@name' => $name)));
     $user->pass_raw = $pass; // Needed by drupalLogin.
     // Login user.
     $this->drupalLogin($user);
@@ -266,7 +266,7 @@ class DBLogTestCase extends DrupalWebTes
     $this->assertResponse(200);
     // Retrieve node object.
     $node = $this->drupalGetNodeByTitle($title);
-    $this->assertTrue($node != null, t('Node @title was loaded', array('@title' => $title)));
+    $this->assertTrue($node != NULL, t('Node @title was loaded', array('@title' => $title)));
     // Edit node.
     $edit = $this->getContentUpdate($type);
     $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
Index: modules/filter/filter.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.api.php,v
retrieving revision 1.6
diff -u -p -r1.6 filter.api.php
--- modules/filter/filter.api.php	26 Apr 2009 09:40:25 -0000	1.6
+++ modules/filter/filter.api.php	23 May 2009 23:02:14 -0000
@@ -149,7 +149,7 @@ function hook_filter($op, $delta = 0, $f
  *
  *
  */
-function hook_filter_tips($delta, $format, $long = false) {
+function hook_filter_tips($delta, $format, $long = FALSE) {
   if ($long) {
     return t('To post pieces of code, surround them with &lt;code&gt;...&lt;/code&gt; tags. For PHP code, you can use &lt;?php ... ?&gt;, which will also colour it based on syntax.');
   }
Index: modules/forum/forum.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.test,v
retrieving revision 1.17
diff -u -p -r1.17 forum.test
--- modules/forum/forum.test	2 Apr 2009 20:39:44 -0000	1.17
+++ modules/forum/forum.test	23 May 2009 23:02:14 -0000
@@ -257,7 +257,7 @@ class ForumTestCase extends DrupalWebTes
 
     // Retrieve node object.
     $node = $this->drupalGetNodeByTitle($title);
-    $this->assertTrue($node != null, t('Node @title was loaded', array('@title' => $title)));
+    $this->assertTrue($node != NULL, t('Node @title was loaded', array('@title' => $title)));
 
     // View forum topic.
     $this->drupalGet('node/' . $node->nid);
Index: modules/node/node.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.api.php,v
retrieving revision 1.20
diff -u -p -r1.20 node.api.php
--- modules/node/node.api.php	12 May 2009 23:19:13 -0000	1.20
+++ modules/node/node.api.php	23 May 2009 23:02:15 -0000
@@ -601,7 +601,7 @@ function hook_prepare($node) {
       return;
     }
     $node->images['_original'] = $file->filepath;
-    _image_build_derivatives($node, true);
+    _image_build_derivatives($node, TRUE);
     $node->new_file = TRUE;
   }
 }
Index: modules/node/node.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.test,v
retrieving revision 1.24
diff -u -p -r1.24 node.test
--- modules/node/node.test	6 May 2009 19:56:21 -0000	1.24
+++ modules/node/node.test	23 May 2009 23:02:15 -0000
@@ -343,7 +343,7 @@ class PageEditTestCase extends DrupalWeb
 
     // Check that "edit" link points to correct page.
     $this->clickLink(t('Edit'));
-    $edit_url = url("node/$node->nid/edit", array('absolute' => true));
+    $edit_url = url("node/$node->nid/edit", array('absolute' => TRUE));
     $actual_url = $this->getURL();
     $this->assertEqual($edit_url, $actual_url, t('On edit page.'));
 
Index: modules/openid/openid.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.inc,v
retrieving revision 1.15
diff -u -p -r1.15 openid.inc
--- modules/openid/openid.inc	12 May 2009 08:37:44 -0000	1.15
+++ modules/openid/openid.inc	23 May 2009 23:02:16 -0000
@@ -154,7 +154,7 @@ function _openid_create_message($data) {
 
   foreach ($data as $key => $value) {
     if ((strpos($key, ':') !== FALSE) || (strpos($key, "\n") !== FALSE) || (strpos($value, "\n") !== FALSE)) {
-      return null;
+      return NULL;
     }
     $serialized .= "$key:$value\n";
   }
@@ -381,7 +381,7 @@ function _openid_dh_rand($stop) {
 }
 
 function _openid_get_bytes($num_bytes) {
-  static $f = null;
+  static $f = NULL;
   $bytes = '';
   if (!isset($f)) {
     $f = @fopen(OPENID_RAND_SOURCE, "r");
Index: modules/search/search.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.api.php,v
retrieving revision 1.7
diff -u -p -r1.7 search.api.php
--- modules/search/search.api.php	9 May 2009 10:45:57 -0000	1.7
+++ modules/search/search.api.php	23 May 2009 23:02:16 -0000
@@ -70,7 +70,7 @@
  *
  * @ingroup search
  */
-function hook_search($op = 'search', $keys = null) {
+function hook_search($op = 'search', $keys = NULL) {
   switch ($op) {
     case 'name':
       return t('Content');
@@ -262,13 +262,13 @@ function hook_update_index() {
 
     // Get node output (filtered and with module-specific fields).
     if (node_hook($node, 'view')) {
-      node_invoke($node, 'view', false, false);
+      node_invoke($node, 'view', FALSE, FALSE);
     }
     else {
-      $node = node_prepare($node, false);
+      $node = node_prepare($node, FALSE);
     }
     // Allow modules to change $node->body before viewing.
-    module_invoke_all('node_view', $node, false, false);
+    module_invoke_all('node_view', $node, FALSE, FALSE);
 
     $text = '<h1>' . drupal_specialchars($node->title) . '</h1>' . $node->body;
 
Index: modules/simpletest/files/php-2.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/files/php-2.php,v
retrieving revision 1.1
diff -u -p -r1.1 php-2.php
--- modules/simpletest/files/php-2.php	20 Apr 2008 18:23:30 -0000	1.1
+++ modules/simpletest/files/php-2.php	23 May 2009 23:02:16 -0000
@@ -1,3 +1,2 @@
 <?php
 print 'SimpleTest PHP was executed!';
-?>
\ No newline at end of file
Index: modules/simpletest/tests/cache.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/cache.test,v
retrieving revision 1.5
diff -u -p -r1.5 cache.test
--- modules/simpletest/tests/cache.test	29 Apr 2009 12:08:28 -0000	1.5
+++ modules/simpletest/tests/cache.test	23 May 2009 23:02:16 -0000
@@ -18,8 +18,8 @@ class CacheTestCase extends DrupalWebTes
    * @return
    *   TRUE on pass, FALSE on fail.
    */
-  protected function checkCacheExists($cid, $var, $table = null) {
-    if ($table == null) {
+  protected function checkCacheExists($cid, $var, $table = NULL) {
+    if ($table == NULL) {
       $table = $this->default_table;
     }
 
Index: modules/simpletest/tests/common.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/common.test,v
retrieving revision 1.40
diff -u -p -r1.40 common.test
--- modules/simpletest/tests/common.test	22 May 2009 14:57:36 -0000	1.40
+++ modules/simpletest/tests/common.test	23 May 2009 23:02:17 -0000
@@ -757,7 +757,7 @@ class DrupalDataApiTest extends DrupalWe
    */
   function testDrupalWriteRecord() {
     // Insert an object record for a table with a single-field primary key.
-    $vocabulary = new StdClass();
+    $vocabulary = new stdClass();
     $vocabulary->name = 'test';
     $insert_result = drupal_write_record('taxonomy_vocabulary', $vocabulary);
     $this->assertTrue($insert_result == SAVED_NEW, t('Correct value returned when a record is inserted with drupal_write_record() for a table with a single-field primary key.'));
@@ -769,7 +769,7 @@ class DrupalDataApiTest extends DrupalWe
     $this->assertTrue($update_result == SAVED_UPDATED, t('Correct value returned when a record updated with drupal_write_record() for table with single-field primary key.'));
 
     // Insert an object record for a table with a multi-field primary key.
-    $vocabulary_node_type = new StdClass();
+    $vocabulary_node_type = new stdClass();
     $vocabulary_node_type->vid = $vocabulary->vid;
     $vocabulary_node_type->type = 'page';
     $insert_result = drupal_write_record('taxonomy_vocabulary_node_type', $vocabulary_node_type);
