File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/PHPCR/Util/CND/Writer Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,12 @@ protected function writeNodeType(NodeTypeDefinitionInterface $nodeType)
135135
136136 private function writeProperties ($ properties )
137137 {
138+ if (null === $ properties ) {
139+ // getDeclaredPropertyDefinitions is allowed to return null on
140+ // newly created node type definitions
141+ return '' ;
142+ }
143+
138144 $ s = '' ;
139145
140146 /** @var $property PropertyDefinitionInterface */
@@ -190,6 +196,12 @@ private function writeProperties($properties)
190196
191197 private function writeChildren ($ children )
192198 {
199+ if (null === $ children ) {
200+ // getDeclaredChildNodeDefinitions is allowed to return null on
201+ // newly created node type definitions
202+ return '' ;
203+ }
204+
193205 $ s = '' ;
194206
195207 /** @var $child NodeDefinitionInterface */
You can’t perform that action at this time.
0 commit comments