--TEST-- DOMElement->prefix with empty string creates bogus prefix --EXTENSIONS-- dom --FILE-- loadXML(""); $container = $dom->documentElement; echo "--- Changing the prefix to an empty string ---\n"; $container->prefix = ""; echo $dom->saveXML(); echo "--- Changing the prefix to an empty C-style string ---\n"; $container->prefix = "\0foobar"; echo $dom->saveXML(); echo "--- Changing the prefix to \"hello\" ---\n"; $container->prefix = "hello"; echo $dom->saveXML(); echo "--- Changing the prefix to that of a conflicting namespace (\"conflict\") ---\n"; try { $container->prefix = "conflict"; } catch (DOMException $e) { echo $e->getMessage(), "\n"; } echo $dom->saveXML(); ?> --EXPECT-- --- Changing the prefix to an empty string --- --- Changing the prefix to an empty C-style string --- --- Changing the prefix to "hello" --- --- Changing the prefix to that of a conflicting namespace ("conflict") --- Namespace Error