Skip to content

Commit 4e9ce41

Browse files
committed
Update JsUtils.php
1 parent d0ec95f commit 4e9ce41

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Ajax/JsUtils.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,18 +359,19 @@ public function compile(&$view = NULL, $view_var = 'script_foot', $script_tags =
359359
* @return void
360360
*/
361361
public function clear_compile() {
362-
$this->jquery_code_for_compile = array();
362+
$this->jquery_code_for_compile = $this->jquery_code_for_compile_at_last = [];
363363
}
364364

365365
public function getScript($offset = 0) {
366-
$code = $this->jquery_code_for_compile;
367-
if ($offset > 0)
366+
$code = \array_merge($this->jquery_code_for_compile, $this->jquery_code_for_compile_at_last);
367+
if ($offset > 0) {
368368
$code = \array_slice($code, $offset);
369-
return implode('', $code);
369+
}
370+
return \implode('', $code);
370371
}
371372

372373
public function scriptCount() {
373-
return \sizeof($this->jquery_code_for_compile);
374+
return \count($this->jquery_code_for_compile);
374375
}
375376

376377
/**

0 commit comments

Comments
 (0)