frontend.css.php problem - save string vars are causes echo

Frontend.css.php:

<?php  $css = $module->generate_title_style( $settings ); ?>

<?php if ( !empty($css) ): ?>
	.fl-builder-content .fl-node-<?php echo $id; echo $css; ?> 
<?php endif; ?>

custom-module.php

 public function generate_title_style( $settings ) {
   return " h3 { font-size: 55px !important; } ";
 }

uploads/bb-plugin/cache/69-layout-draft.css?ver=696e8d34cc262a2b2e2b6b7931cc52bf":
h3 { font-size: 55px !important; } .fl-builder-content .fl-node-558af0fc3af2f h3 { font-size: 55px !important; }.fl-post-header { display:none; }

$css = $module->generate_title_style( $settings ); acts as an echo!
Any explanation why?

Hey Elemento,

That’s bizarre. I’m not entirely sure. Do you have any other code in that file?

Justin

[Content Hidden]

Hi Elemento,

It looks like you have quite a bit of logic running in the $module->generate_title_style( $settings ); call. Are you sure something within that isn’t causing the print/echo. That’s the only thing I can think of as the code above looks fine. This is a bit beyond the scope of Beaver Builder so I’m not sure I can be of much assistance here.

Justin