| 
		 Mantis - Quercus 
	 | 
|||||
| Viewing Issue Advanced Details | |||||
| 
		 | 
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: | 
| 1397 | minor | always | 10-09-06 17:38 | 01-04-07 13:58 | |
| 
		 | 
|||||
| Reporter: | dberry | Platform: | |||
| Assigned To: | ferg | OS: | |||
| Priority: | normal | OS Version: | |||
| Status: | closed | Product Version: | 3.0.21 | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 3.1.1 | ||
| 
		 | 
|||||
| Summary: | 0001397: Putting intval() around a SimpleXMLElement node returns a '1' | ||||
| Description: | Converting a numeric xml element using intval() causes the value to become 1. | ||||
| Steps To Reproduce: | |||||
| Additional Information: | 
		<?php // This is a test to find out what is causing problems with the xmldata ?> <html> <head> </head> <body> <?php $xml = simplexml_load_file("http://localhost:8080/platform/BadEmptyElement.xml"); [^] echo(" ============================== Test 1 ================================== "); foreach ($xml->events->event as $event) { syslog(LOG_ERR,"=================With intval() ==========================="); syslog(LOG_ERR,"key_event_id=<".intval($event->key_event_id[0]).">"); syslog(LOG_ERR,"event_owner=<".intval($event->event_owner[0]).">"); syslog(LOG_ERR,"event_type=<". intval($event->event_type[0]).">"); echo(" =================With intval() =========================== "); echo("key_event_id=<". intval($event->key_event_id[0])."> "); echo("event_owner=<". intval($event->event_owner[0])."> "); echo("event_type=<". intval($event->event_type[0])."> "); syslog(LOG_ERR,"=================Without intval() ==========================="); syslog(LOG_ERR,"key_event_id=<".$event->key_event_id[0].">"); syslog(LOG_ERR,"event_owner=<".$event->event_owner[0].">"); syslog(LOG_ERR,"event_type=<". $event->event_type[0].">"); echo("=================Without intval() =========================== "); echo("key_event_id=<". $event->key_event_id[0]."> "); echo("event_owner=<". $event->event_owner[0]."> "); echo("event_type=<". $event->event_type[0]."> "); } /* echo(" =========================== Test 2 ============================= "); $xml2 = simplexml_load_file("http://localhost:8080/platform/BadCDATAElement.xml"); [^] foreach ($xml2->events->event as $event2) { echo("key_event_id=<". $event2->key_event_id."> "); echo("event_name=<". $event2->event_name."> "); echo("event_owner=<". $event2->event_owner."> "); echo("event_type=<". $event2->event_type."> "); echo("event_description=<".$event2->event_description."> "); echo("event_geographic_area=<". $event2->event_geographic_area."> "); echo("event_dcreated=<". $event2->event_dcreated."> "); echo("event_dstarted=<". $event2->event_dstarted."> "); echo("event_dstopped=<". $event2->event_dstopped."> "); echo("event_resource_accepted=<". $event2->event_resource_accepted."> "); echo("event_facility=<". $event2->event_facility."> "); } */ ?> </body> </html>  | 
||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
| 
		 | 
|||||
		
  | 
	
		
  | 
||||
| 
		 | 
|||||
		
  | 
	
		
  | 
||||