We encountered something similar with OS version 32 bit vs. 64 bit, having the same PHP version 5.2.4. The dev machines use 32 bit OS but staging/prod run on 64 bit and the problem happened only on the 64 bit machines.
gabriel On Aug 17, 10:18 am, El Duderino <[email protected]> wrote: > The problem was eventually identified to where a type cast was being > made. The PreProduction server did not have an issue with this but the > Live server failed when converting the object to a string with > (string). Solved when __toString() was used instead. > > Before: > $replaceVariables = array('var1' => $Practice->getDateStart(), 'var2' > => (string)$Practice->getCompleteName()); > > After: > $replaceVariables = array('var1' => $Practice->getDateStart(), 'var2' > => $Practice->getCompleteName()->__toString()); > > Production runs PHP 5.2.4, PreProduction 5.2.6 and both worked > correctly with (string) in test cases: > > <?php > class Foo { > public $name; > > public function __construct($name) { > $this->name = $name; > } > > public function __toString() { > return $this->name; > } > > } > > $foo = new Foo('foobar'); > echo (string)$foo; > ?> > > This isn't something you would expect but there was a solution > available to deal with it. I'd be very interested to know why the > Production server behaves in this case. > > Thanks -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
