MDL-49518 libraries: Update lessphp to 1.7.0.3

This commit is contained in:
Dave Cooper
2015-03-24 11:01:13 +08:00
parent a149d6a177
commit 657b12788d
61 changed files with 512 additions and 290 deletions
Regular → Executable
+3 -3
View File
@@ -46,7 +46,7 @@ class Less_Exception_Chunk extends Less_Exception_Parser{
* We don't actually need the chunks
*
*/
function Chunks(){
protected function Chunks(){
$level = 0;
$parenLevel = 0;
$lastMultiCommentEndBrace = null;
@@ -173,12 +173,12 @@ class Less_Exception_Chunk extends Less_Exception_Parser{
//$this->emitChunk(true);
}
function CharCode($pos){
public function CharCode($pos){
return ord($this->input[$pos]);
}
function fail( $msg, $index = null ){
public function fail( $msg, $index = null ){
if( !$index ){
$this->index = $this->parserCurrentIndex;
View File
Regular → Executable
+6 -1
View File
@@ -99,7 +99,12 @@ class Less_Exception_Parser extends Exception{
*/
public function getLineNumber(){
if( $this->index ){
return substr_count($this->input, "\n", 0, $this->index) + 1;
// https://bugs.php.net/bug.php?id=49790
if (ini_get("mbstring.func_overload")) {
return substr_count(substr($this->input, 0, $this->index), "\n") + 1;
} else {
return substr_count($this->input, "\n", 0, $this->index) + 1;
}
}
return 1;
}