Fix errors in statusnet addon

pull/1575/head
Art4 2024-11-24 19:55:54 +00:00
parent e9d3afb483
commit 6df91dd37b
2 changed files with 4 additions and 5 deletions

View File

@ -762,13 +762,13 @@ class CodebirdSN
* @param string $method The API method to call * @param string $method The API method to call
* @param array $params The parameters to send along * @param array $params The parameters to send along
* *
* @return void * @return string
*/ */
protected function _buildMultipart($method, $params) protected function _buildMultipart($method, $params)
{ {
// well, files will only work in multipart methods // well, files will only work in multipart methods
if (! $this->_detectMultipart($method)) { if (! $this->_detectMultipart($method)) {
return; return '';
} }
// only check specific parameters // only check specific parameters
@ -783,7 +783,7 @@ class CodebirdSN
); );
// method might have files? // method might have files?
if (! in_array($method, array_keys($possible_files))) { if (! in_array($method, array_keys($possible_files))) {
return; return '';
} }
$possible_files = explode(' ', $possible_files[$method]); $possible_files = explode(' ', $possible_files[$method]);
@ -794,7 +794,6 @@ class CodebirdSN
// is it an array? // is it an array?
if (is_array($value)) { if (is_array($value)) {
throw new \Exception('Using URL-encoded parameters is not supported for uploading media.'); throw new \Exception('Using URL-encoded parameters is not supported for uploading media.');
continue;
} }
// check for filenames // check for filenames

View File

@ -631,7 +631,7 @@ function winning_move() {
function draw_board() { function draw_board() {
if(! strlen($this->yours)) if(! strlen($this->yours))
$this->yours = 'XXX'; $this->yours = 'XXX';
$o .= "<form action=\"tictac/{$this->handicap}/{$this->mefirst}/{$this->dimen}/{$this->yours}/{$this->mine}\" method=\"post\" />"; $o = "<form action=\"tictac/{$this->handicap}/{$this->mefirst}/{$this->dimen}/{$this->yours}/{$this->mine}\" method=\"post\" />";
for($x = 0; $x < $this->dimen; $x ++) { for($x = 0; $x < $this->dimen; $x ++) {
$o .= '<table>'; $o .= '<table>';
for($y = 0; $y < $this->dimen; $y ++) { for($y = 0; $y < $this->dimen; $y ++) {