Hello,
I am developing module where I want to render Module 1 in Module 2 through form fields. I had also created one sample demo for it.
Module 1 : Basic Example
Module 2 : Test
Basic Example module uses font field. Following are steps, I followed to achieve my requirement.
Step 1 : I had registered form in Module 2.
Step 2 : Now rendered Module 1 CSS in Module 2’s “frontend.css.php” file.
Error : Now whenever I tried to save Form from Module 2, it shows error as given below
.fl-node-56fe20f143df1 .fl-example-text-font { color: #333333; <br /> <b>Fatal error</b>: Cannot use object of type stdClass as array in <b>C:\xampp\htdocs\git\wp-content\plugins\bb-sample-demo\basic-example\includes\frontend.css.php</b> on line <b>4</b><br/>
So tried one solution for it. Its worked perfect. Is this correct?
if ( is_object( $settings->font_family ) ) { $settings->font_family = json_decode(json_encode( $settings->font_family ), True); }
Well, Now when I open module again it gives error like this.
<br /><b>Fatal error</b>: Cannot use object of type stdClass as array in <b>C:\xampp\htdocs\git\wp-content\plugins\bb-plugin-ie-light-2\includes\field-font.php</b> on line <b>8</b><br />
I have also attached zip file of demo.Download here. Is I am doing anything wrong? Can you help me to resolve this issue?