: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$options[CURLOPT_INFILESIZE] = $size;
curl_setopt_array($curl, $options);
//create or update File in the Target
$file = json_decode(elFinder::curlExec($curl));
return $this->_joinPath($parent, $file->id);
return $this->setError('OneDrive error: ' . $e->getMessage());
* @param string $path file path
* @author Dmitry (dio) Levashov
protected function _getContents($path)
list(, $itemId) = $this->_od_splitPath($path);
$url = self::API_URL . $itemId . '/content';
$contents = $this->_od_createCurl($url, $contents = true);
return $this->setError('OneDrive error: ' . $e->getMessage());
* Write a string to a file.
* @param string $path file path
* @param string $content new file content
* @author Dmitry (dio) Levashov
protected function _filePutContents($path, $content)
if ($local = $this->getTempFile($path)) {
if (file_put_contents($local, $content, LOCK_EX) !== false
&& ($fp = fopen($local, 'rb'))) {
$res = $this->_save($fp, $path, '', array());
file_exists($local) && unlink($local);
* Detect available archivers.
protected function _checkArchivers()
// die('Not yet implemented. (_checkArchivers)');
protected function _chmod($path, $mode)
* @param string $path archive path
* @param array $arc archiver command and arguments (same as in $this->archivers)
* @author Dmitry (dio) Levashov
* @author Alexey Sukhotin
protected function _unpack($path, $arc)
die('Not yet implemented. (_unpack)');
* Extract files from archive.
* @param string $path archive path
* @param array $arc archiver command and arguments (same as in $this->archivers)
* @author Dmitry (dio) Levashov,
* @author Alexey Sukhotin
protected function _extract($path, $arc)
die('Not yet implemented. (_extract)');
* Create archive and return its path.
* @param string $dir target dir
* @param array $files files names list
* @param string $name archive name
* @param array $arc archiver options
* @author Dmitry (dio) Levashov,
* @author Alexey Sukhotin
protected function _archive($dir, $files, $name, $arc)
die('Not yet implemented. (_archive)');