CVS update: php3/functions
| From: | thies | Date: | Thu, 07 Jan 1999 17:46:33 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-3380@lists.php.net to get a copy of this message | ||
Date: Thursday January 7, 1999 @ 12:46
Author: thies
Update of /repository/php3/functions
In directory asf:/u/temp/cvs-serv982/functions
Modified Files:
var.c
Log Message:
serialize and var_dump no longer print/serialize array elements that have been "unset"
Index: php3/functions/var.c
diff -c php3/functions/var.c:1.11 php3/functions/var.c:1.12
*** php3/functions/var.c:1.11 Mon Jan 4 09:25:22 1999
--- php3/functions/var.c Thu Jan 7 12:46:33 1999
***************
*** 27,33 ****
+----------------------------------------------------------------------+
*/
! /* $Id: var.c,v 1.11 1999/01/04 14:25:22 jah Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
--- 27,33 ----
+----------------------------------------------------------------------+
*/
! /* $Id: var.c,v 1.12 1999/01/07 17:46:33 thies Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
***************
*** 92,100 ****
strcpy(buf, "\n");
PHPWRITE(buf, strlen(buf));
}
- c++;
if (_php3_hash_get_current_data(struc->value.ht, (void **) (&data)) != SUCCESS || !data
|| (data == struc))
continue;
switch (i) {
case HASH_KEY_IS_LONG:{
pval d;
--- 92,103 ----
strcpy(buf, "\n");
PHPWRITE(buf, strlen(buf));
}
if (_php3_hash_get_current_data(struc->value.ht, (void **) (&data)) != SUCCESS || !data
|| (data == struc))
continue;
+ if (data->type==IS_STRING && data->value.str.val==undefined_variable_string) {
+ continue;
+ }
+ c++;
switch (i) {
case HASH_KEY_IS_LONG:{
pval d;
***************
*** 206,212 ****
pval *data;
pval d;
ulong index;
!
_php3_hash_internal_pointer_reset(struc->value.ht);
for (;; _php3_hash_move_forward(struc->value.ht)) {
if ((i = _php3_hash_get_current_key(struc->value.ht, &key, &index)) ==
HASH_KEY_NON_EXISTANT) {
--- 209,215 ----
pval *data;
pval d;
ulong index;
!
_php3_hash_internal_pointer_reset(struc->value.ht);
for (;; _php3_hash_move_forward(struc->value.ht)) {
if ((i = _php3_hash_get_current_key(struc->value.ht, &key, &index)) ==
HASH_KEY_NON_EXISTANT) {
***************
*** 215,220 ****
--- 218,227 ----
if (_php3_hash_get_current_data(struc->value.ht, (void **) (&data)) != SUCCESS ||
!data || (data == struc)) {
continue;
}
+ if (data->type==IS_STRING && data->value.str.val==undefined_variable_string) {
+ continue;
+ }
+
switch (i) {
case HASH_KEY_IS_LONG:
d.type = IS_LONG;
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net