I have used the script many times in the past, without any issues. This time I was getting an error that the arguments were not passed. The only difference between the previous servers and this was php 7.
I updated the following code in the get_cli_arguments function
if ( preg_match( '#--([^=]+)=(.*)#', $arg, $reg ) )
$_ARG->$reg[1] = $reg[2];
to
if ( preg_match( '#--([^=]+)=(.*)#', $arg, $reg ) ){
$ind = $reg[1]; $_ARG->$ind = $reg[2];
}
I have used the script many times in the past, without any issues. This time I was getting an error that the arguments were not passed. The only difference between the previous servers and this was php 7.
I updated the following code in the get_cli_arguments function
if ( preg_match( '#--([^=]+)=(.*)#', $arg, $reg ) )
$_ARG->$reg[1] = $reg[2];
to
if ( preg_match( '#--([^=]+)=(.*)#', $arg, $reg ) ){
$ind = $reg[1]; $_ARG->$ind = $reg[2];
}