Wrong JSON format
-
Hi, thanks for plugin, but I have some wrong with it.
When I try sync any translation file (po or pot) it end with json error (unexpected end of file).
last line – {“id”:””,”source”:”Testimonials Extra information”,”target”:””,”refs”:”plugins\/ravis-booking\/fields\/testimonials.php:97″,”notes”:”$id”}],”headers”:
This is what I find out about this.
It add part ‘headers’ to the Json (and because it is empty array() ) it makes some error.
In file loco-posyncs.php at line 59 is condition
$headers = array(); if( '' === $exp[0]['source'] ){ $keep = array('Project-Id-Version','Language-Team','POT-Creation-Date','POT-Revision-Date'); $head = loco_parse_po_headers( $exp[0]['target'] ); $headers = array_intersect_key( $head->export(), array_flip($keep) ); /*/ add prefixed header keys that can't be included above foreach( $head as $key => $value ){ if( 0 === strpos($key, 'X-Poedit-' ) ){ $headers[$key] = $value; } }*/ $exp[0] = array(); }
but variable $exp[0][‘source’] is not empty (start some constant).
It works few days ago, but Im not edit nothing from the loco.
Thank you.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Wrong JSON format’ is closed to new replies.