YOURLS: Call to undefined function yourls_nonce_url()
Since update to 1.7.9
I get this error:
[24-Apr-2020 11:00:48 UTC] PHP Fatal error: Uncaught Error: Call to undefined function yourls_nonce_url() in C:\Apache24\htdocs\example.com\www\includes\functions-html.php:528
Stack trace:
#0 C:\Apache24\htdocs\example.com\www\includes\functions.php(295): yourls_table_add_row()
#1 C:\Apache24\htdocs\example.com\www\includes\functions-api.php(21): yourls_add_new_link()
#2 C:\Apache24\htdocs\example.com\www\includes\functions-plugins.php(150): yourls_api_action_shorturl()
#3 C:\Apache24\htdocs\example.com\www\yourls-api.php(35): yourls_apply_filter()
#4 C:\Apache24\htdocs\example.com\www\api.php(26): require_once('C:\\Apache24\\htd...')
#5 {main}
thrown in C:\Apache24\htdocs\example.com\www\includes\functions-html.php on line 528
api.php looks like this:
// Some recaptcha stuff
// [...]
if ($resp->isSuccess()) {
define('YOURLS_PRIVATE', false);
require_once( dirname(__FILE__).'/yourls-api.php' ); // line 26
} else {
require_once( dirname(__FILE__).'/includes/load-yourls.php' );
$format = ( isset( $_REQUEST['format'] ) ? $_REQUEST['format'] : 'xml' );
$return = array(
'status' => 'fail',
'code' => 'error:recaptcha',
'message' => 'reCAPTCHA not successfull',
'recaptcha_score' => $resp->getScore(),
'errorCode' => '403',
);
yourls_api_output( $format, $return );
}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (9 by maintainers)
Commits related to this issue
- Regroup and always load auth functions Fixes #2662 Fixes #2661 — committed to YOURLS/YOURLS by ozh 4 years ago
- Php81 update (#2) * deprecate Twitter :-( See #2639 and https://git.io/Jvhw6 for more info * Remove obsolete setting and link to wiki [skip ci] [skip travis] [skip scrutinizer] * Accept t... — committed to iWantToKeepAnon/YOURLS by iWantToKeepAnon a year ago
- Split functions.php in smaller files New function files for: * debug * options * links * geo * shorturls Fixes #2654 * Regroup and always load auth functions Fixes #2662 Fixes #2661 Co... — committed to UltraNurd/YOURLS by ozh 4 years ago
Oh, indeed. I moved some functions from one file to another without thinking about guys running a public shortener.
Quick fix until next release: simply add
require_once '/path/to/includes/functions-auth.php';
to yourconfig.php
(edit: need to hardcode path)Pinned to aid visibility.