syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in pagination.php - joomla

When going to the website I get the following error:
syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in /libraries/joomla/pagination/pagination.php on line 701
The line 701 is as follows:
$data->end->link = JRoute::_($params . '&' . $this->prefix . 'limitstart

Related

How to build ICU4C 70.1 on HP UX platform?

I want to build ICU4C code for HP UX platform .
ICU4C repo -> https://github.com/unicode-org/icu/tree/release-70-1.
HP-UX version that i am using -
HP-UX B.11.31 U ia64 ,
aCC compiler version that i am using -
HP C/aC++ B3910B A.06.29
I tried +std=c++11 and -AA option with aCC like ->
aCC -DU_ATTRIBUTE_DEPRECATED= -D_REENTRANT -D_THREAD_SAFE -DU_HAVE_ELF_H=1 -DU_HAVE_STRTOD_L=0 -I../common +std=c++11 -w +O2 +Ofltacc +check=stack -AA +DD64 -mt -AA -Wc,-ansi_for_scope,on +W740 +W749 +W823 +W4232 -DVXPSP_CCFLAGS -c +Z -o stubdata.o stubdata.cpp
But when i am building stubdata.cpp file from icu stubdata project its giving me error related to unique_ptr as -
"../common/unicode/localpointer.h", line 238: error #2283: qualified name is not allowed explicit LocalPointer(std::unique_ptr<T> &&p)
"../common/unicode/localpointer.h", line 238: error #2018: expected a ")"
explicit LocalPointer(std::unique_ptr<T> &&p)
^
"../common/unicode/localpointer.h", line 239: error #2028: expression must
have a constant value
: LocalPointerBase<T>(p.release()) {}
^
"../common/unicode/localpointer.h", line 238: error #2771: "explicit" is not
allowed
explicit LocalPointer(std::unique_ptr<T> &&p)
^
"../common/unicode/localpointer.h", line 239: error #2065: expected a ";"
: LocalPointerBase<T>(p.release()) {}
^
"../common/unicode/localpointer.h", line 413: error #2283: qualified name is
not allowed
explicit LocalArray(std::unique_ptr<T[]> &&p)
^
"../common/unicode/localpointer.h", line 413: error #2018: expected a ")"
explicit LocalArray(std::unique_ptr<T[]> &&p)
^
"../common/unicode/localpointer.h", line 414: error #2028: expression must
have a constant value
: LocalPointerBase<T>(p.release()) {}
^
"../common/unicode/localpointer.h", line 413: error #2771: "explicit" is not
allowed
explicit LocalArray(std::unique_ptr<T[]> &&p)
^
"../common/unicode/localpointer.h", line 414: error #2065: expected a ";"
: LocalPointerBase<T>(p.release()) {}
^
"../common/unicode/udata.h", line 434: error #2283: qualified name is not
allowed
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
"../common/unicode/udata.h", line 434: error #2018: expected a ")"
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
"../common/unicode/udata.h", line 434: error #2040: expected an identifier
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
"../common/unicode/udata.h", line 434: error #2079: expected a type specifier
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
"../common/unicode/udata.h", line 434: error #2771: "explicit" is not allowed
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
"../common/unicode/udata.h", line 434: error #2065: expected a ";"
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
16 errors detected in the compilation of "stubdata.cpp".
It seems like aCC compiler don't have support for this C++ 11 feature unique_ptr .
Also i tried to run a sample standalone program having unique_ptr , but its not able to compile . Whereas other c++11 features like nullptr / range based for loop etc are compiled with aCC compiler on HP .
Any suggestions?

Preg_match(): missing closing parenthesis

A plugin is generating the following error:
Got error 'PHP message: PHP Warning: preg_match(): Compilation failed: missing closing parenthesis at offset 946 - DeferJS.php on line 78
The line of code that generates the error:
if ( preg_match( '#(' . $exclude_defer_js . ')#i', $tag['url'] ) ) {
Thanks for any help
$exclude_defer_js must contain special characters.
Use preg_quote:
if ( preg_match( '#' . preg_quote($exclude_defer_js, '#') . '#i', $tag['url'] ) ) {

Error on certain line: Syntax error: "(" unexpected

Have an error "Syntax error: "(" unexpected" when execute an script:
sync.sh: 11: sync.sh: Syntax error: "(" unexpected
line 11 contains on this:
declare -a FOLDERS=('/scripts' '/backup')
and on the top of script have the interpreter:
#!/bin/bash
Execute the script with:
sh /wdmycloudex2/$(hostname)/scripts/sync.sh
/wdmycloudex2/RASPBIAN/scripts/sync.sh: 11: /wdmycloudex2/RASPBIAN/scripts/sync.sh: Syntax error: "(" unexpected
The firsts 11 lines:
#!/bin/bash
IP='10.0.1.7'
PORT='443'
HOSTNAME=$(hostname)
DATE=$(date +%d%m%Y_%H%M%S)
SOURCE='/scripts'
DEST='/wdmycloudex2'
declare -a FOLDERS=('/scripts' '/backup')
anybody know and explain what's the problem?
The header #!/bin/bash is ignored when you start the script with sh sync.sh.
It will go better with bash /wdmycloudex2/RASPBIAN/scripts/sync.sh or
chmod +x /wdmycloudex2/RASPBIAN/scripts/sync.sh
/wdmycloudex2/RASPBIAN/scripts/sync.sh

use Chef file.insert_line_if_no_match method for CIDR address

I am trying to use file.insert_line_if_no_match for CIDR address:
attributes/default.rb:
default["chefclustercidr"]["ip"] = "a.b.c.d/24"
recipe/default.rb
ruby_block "chef-backend.rb" do
block do
file = Chef::Util::FileEdit.new("/etc/chef-backend/chef-backend.rb")
file.insert_line_if_no_match("/publish_address/" , "publish_address i#{node['chefclusterbe1']['ip']}")
file.insert_line_if_no_match("/postgresql/" , "postgresql.md5_auth_cidr_addresses = ["samehost", "samenet", "#{node['chefclustercidr']['ip']}/24"]")
file.write_file
end
end
but getting ruby syntax error
$ruby -c default.rb
default.rb:95: syntax error, unexpected tIDENTIFIER, expecting ')'
th_cidr_addresses = ["samehost", "samenet","#{node['chefclus
^
default.rb:95: syntax error, unexpected tIDENTIFIER, expecting keyword_end
resses = ["samehost", "samenet","#{node['chefclustercidr']['
^
default.rb:99: syntax error, unexpected keyword_end, expecting end-of-input
FileEdit is an internal class and using it from recipe code is NOT SUPPORTED. Do not use it. Period.
That said, the problem is you have unescaped double quotes in your string.
Instead of insert_line_if_no_match you can deal with it another way, using bash and grep. I have added the way to another question you can have a look here
here is the bash resource i usually use to append to files only if there is no match:
bash 'append line(s) to file if it doesnt exist' do
user 'user'
code <<-EOS
cat >>/home/file <<EOL
*.* ##172.167.189.67:514
EOL
EOS
not_if "grep -q 172.167.189.67 /home/file"
end
you may need to run cookstyle on that ^

Laravel 5.3.19 Illuminate\Support\Str::class error syntax error, unexpected ';'

I got error when i use Str from Alliases
Aliases Declaration:
'Str' => Illuminate\Support\Str::class,
Usages:
<p>{{ Str::limit($notice->description,100)}}</p>
Error Type:
FatalErrorException in aae7b22b68f86ae3874e1bac917a810813cbf059.php line 380: syntax error, unexpected ';'

Resources