]> granicus.if.org Git - php/commitdiff
- tiny changes to testscript and domxml
authorUwe Steinmann <steinm@php.net>
Fri, 3 Mar 2000 12:38:20 +0000 (12:38 +0000)
committerUwe Steinmann <steinm@php.net>
Fri, 3 Mar 2000 12:38:20 +0000 (12:38 +0000)
ext/domxml/domxml.c
tests/testdom
tests/testhyperwave

index bb801c617eb0c29885d776d6f21b8529365f0224..3af9b851a4699f9ce746b1da5198da2531cbf295 100644 (file)
@@ -1317,8 +1317,9 @@ PHP_FUNCTION(xmltree)
                        if((*keydata)->type == IS_OBJECT) {
                          if (zend_hash_find((*keydata)->value.obj.properties, "type", sizeof("type"), (void **)&prop) == SUCCESS) {
                                        if((*prop)->value.lval == XML_ELEMENT_NODE) {
-                                               root = *keydata;
-                                               zend_hash_update(return_value->value.obj.properties, "root", strlen("root")+1, (void *) &root, sizeof(zval *), NULL);
+                                               zend_hash_update(return_value->value.obj.properties, "root", strlen("root")+1, (void *) &(*keydata), sizeof(zval *), NULL);
+//                                             (*keydata)->is_ref = 1;
+//                                             (*keydata)->refcount = 2;
                                        }
                                }
                        }
index 923a88491dfbdbdcfefe22820e3e0f344c8a5e51..a2ba53d186b4f79fd044a21f72bbfb2be78c9f09 100644 (file)
@@ -82,7 +82,7 @@ $rootnode = $dom->root();
 /* This one creates a dom tree made of php objects */
 echo "Test 2: creating a tree with php objects\n";
 $dom = xmltree($xmlstr);
-//$dom->root->name = "section";
+$dom->root->name = "section";
 var_dump($dom);
 echo $dom->root->name;
 echo "\n";
index 973489cf345270eb1d119f9ddaa1bc20475ea5dd..f7de5284ddcf4c1569fc1263c437a5b7dad1fd67 100644 (file)
@@ -1,10 +1,10 @@
 <?
-  $id = 190867;       // A plain/text document
+  $id = 187852;       // A plain/text document
   $collid = 169828;   // A collection
   $query = "Name=m*";      // Search query for test_9
   $host = "gehtnix";
   $username = "steinm";
-  $password = "akli9132";
+  $password = "";
 
   $connect = hw_connect($host, 418, $username, $password);
   if(hw_error($connect)) {
 
   // Set all test to 'yes' if they shall be executed
   $test_1 = "yes";    // Get the text document with id $id and output it
-  $test_2 = "yes";    // Check if id $id is in $collid
-  $test_3 = "yes";   // Convert object record to object array and back
-  $test_4 = "yes";   // Get object record of object with id $id
-  $test_5 = "yes";   // List children of $collid
-  $test_6 = "yes";   // List parents of $id
-  $test_7 = "yes";   // Insert a new text document
-  $test_8 = "yes";   // Remove the just inserted text document
-  $test_9 = "yes";   // Searching for objects with Name $query
+  $test_2 = "no";    // Check if id $id is in $collid
+  $test_3 = "no";   // Convert object record to object array and back
+  $test_4 = "no";   // Get object record of object with id $id
+  $test_5 = "no";   // List children of $collid
+  $test_6 = "no";   // List parents of $id
+  $test_7 = "no";   // Insert a new text document
+  $test_8 = "no";   // Remove the just inserted text document
+  $test_9 = "no";   // Searching for objects with Name $query
 
   /* Lists an object array
   */