View Full Version : Unable to UNSET values in Drupal 6.16 / Quercus 4.0.3

04-07-2010, 09:30 PM
Hi there,

I have a fully working Drupal 6.16 site running next to a Java webapp (integrated with eachother using a module) but that is not the issue here.

We are using the Drupal CCK module and a CCK Date module.
From the Java webapp we are executing some php code (using Quercus offcourse) that should nullify some of those fields. And here is where it get's ugly.

I am able to set any value (if it is correct) but I cannot set empty strings or NULL values to any of the php-object fields.

When using Drupal 6 on Quercus (running on Jetty6) I execute the following code:

include_once "./includes/bootstrap.inc";

$original = node_load(1979);
$original->status = 1;

$original->field_date_fasttrack[0]['value'] = "2010-01-01T00:00:00"; // THIS WORKS
$original->field_date_fasttrack[0]['value'] = "0000-00-00T:00:00:00"; // THIS DOES NOT WORK but it is incorrect date so that's obvious
$original->field_date_fasttrack[0]['value'] = ""; // THIS DOES NOT WORK
$original->field_date_fasttrack[0]['value'] = NULL; // THIS DOES NOT WORK

$original->field_module[0]['value'] = "1111"; // THIS WORKS
$original->field_module[0]['value'] = ""; // THIS DOES NOT WORK
$original->field_module[0]['value'] = NULL; // THIS DOES NOT WORK
$original->field_module[0] = NULL; // THIS DOES NOT WORK

$node = node_submit($original);

I was wondering if any of you have run into the same issue with (perhaps) other projects or drupal in specific and could help me out, .. I'm pretty stuck.

Best regards and thank you for reading my message,


04-08-2010, 09:30 AM
I'm using the latest SNAPSHOT now and still have the same issue.
Drupal saves body / title fields and those are able to set to NULL but values in an array (for example CCK) don't work.

To summarize (green lines work, red lines don't):

<?php include_once "./includes/bootstrap.inc";

$original = node_load(1980);
$original->status = 1;

$original->body = NULL;
$original->title = NULL;
$original->field_originator_name[0]["value"] = NULL;
$original->field_originator_name[0]["value"] = "";
$original->field_originator_name[0]["value"] = "My Dog's name is";

if($error = node_validate($original) == NULL) {
$node = node_submit($original);
} else echo "ERROR: " + $error;

04-08-2010, 01:07 PM
I've tried everything to work around this issue and they all fail. :confused:

Does someone have the same problem? Are the people at Caucho able to help me?

Thanks in advance.


04-09-2010, 01:04 AM
I've reported a bug at:


And can you do a var_dump() of the following variables?




05-10-2010, 03:49 PM
Hi nam,

I worked around this problem by creating a QuercusModule that sets NullValue.create() for now.

Keep up the good work.

Best regards,

05-26-2010, 08:38 AM
YSL Shoes (http://www.unshoessales.com/yves-saint-laurent-c-47.html) really give total freedom to your toes.Sounds so surprising!Fashion couldn’t go without Christian Louboutin Shoes (http://www.unshoessales.com/) and Vibram Five Fingers (http://www.shoeseasybuy.com/),which highly promote women's chic personality and sexy,elegant glamor.If we say ED Hardy Shoes (http://www.unshoessales.com/ed-hardy-shoes-c-37.html) gives the whole romantic fantacy to girls zumba dvd (http://www.undvdsale.com/zumba-fitness-dvd-boxset-p-368.html).