Error Paypal thrown but it wasn’t a Paypal paiement

I have this error when I’m trying to pay an order :

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Paypal\Model\Adminhtml\Express::isOrderAuthorizationAllowed() must be an instance of Magento\Sales\Model\Order\Payment, null given, called in /var/www/axiane-portailclient/vendor/magento/module-paypal/Plugin/OrderCanInvoice.php on line 41 and defined in /var/www/axiane-portailclient/vendor/magento/module-paypal/Model/Adminhtml/Express.php:169 Stack trace: #0 /var/www/axiane-portailclient/vendor/magento/module-paypal/Plugin/OrderCanInvoice.php(41): Magento\Paypal\Model\Adminhtml\Express->isOrderAuthorizationAllowed(NULL) #1 /var/www/axiane-portailclient/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Paypal\Plugin\OrderCanInvoice->afterCanInvoice(Object(Magento\Sales\Model\Order\Interceptor), false) #2 /var/www/axiane-portailclient/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\Order\Interceptor->Magento\Framework\Interception{closure}() #3 /var/www/axiane-portailclient/generated/code/Magento/Sales/Model/Orde in /var/www/axiane-portailclient/vendor/magento/module-paypal/Model/Adminhtml/Express.php on line 169

I don’t know why, because it’s not a paypal step.

I’m on magento 2.2.1

Fatal error: Uncaught Error: Call to a member function fetchAll() on boolean in C:\xampp\htdocs\APNNAC\index.php:184 Stack trace: #0 {main} thrown in

            $  sql .= "ORDER BY `evento_id` LIMIT 2;";              $  sql .= "SELECT `evento_id`, `nombre_evento`, `fecha_evento`, `hora_evento`, `cat_evento`, `lugar`, `nombre_invitado`, `apellido_invitado` ";             $  sql .="FROM `eventos` ";             $  sql .= "INNER JOIN `categoria_evento` ";             $  sql .= "ON eventos.id_cat_evento=categoria_evento.id_categoria ";             $  sql .= "INNER JOIN `invitados` ";             $  sql .= "ON eventos.id_inv=invitados.invitado_id";             $  sql .= "AND eventos.id_cat_evento = 2 ";             $  sql .= "ORDER BY `evento_id` LIMIT 2;";              $  sql .= "SELECT `evento_id`, `nombre_evento`, `fecha_evento`, `hora_evento`, `cat_evento`, `lugar`, `nombre_invitado`, `apellido_invitado` ";             $  sql .="FROM `eventos` ";             $  sql .= "INNER JOIN `categoria_evento` ";             $  sql .= "ON eventos.id_cat_evento=categoria_evento.id_categoria ";             $  sql .= "INNER JOIN `invitados` ";             $  sql .= "ON eventos.id_inv=invitados.invitado_id";             $  sql .= "AND eventos.id_cat_evento = 3 ";             $  sql .= "ORDER BY `evento_id` LIMIT 2;";          } catch (Exception $  e) {             //throw $  th;             $  error = $  e->getMessage();         } ?>         <?php echo $  sql; ?>          <?php $  conn->multi_query($  sql); ?>          <?php          do {              # code...              $  resultado = $  conn->store_result();              $  row = $  resultado->fetchAll(MYSQLI_ASSOC); ?>               <?php $  i = 0; ?>               <?php foreach($  row as $  evento): ?>              <?php if($  i % 2 == 0) { ?>              <div id="<?php echo strtolower($  evento['cat_evento']) ?>" class="info-curso ocultar clearfix">              <?php } ?>               <div class="detalle-evento">                  <h3><?php echo utf8_encode($  evento['nombre_evento']) ?></h3>                  <p><i class="icon-clock-o"></i><?php echo $  evento['hora_evento']; ?></p>                  <p><i class="icon-calendar-check-o"></i><?php echo $  evento['fecha_evento']; ?></p>                  <p><i class="icon-map-marker"></i><?php echo $  evento['lugar']; ?></p>                  <p><i class="icon-user"></i><?php echo $  evento['nombre_invitado']?></p>              </div>                <?php if($  i % 2 == 1): ?>                <a href="ver_todos_eventos.php" class="button float-right">Ver todos</a>               </div>              <?php endif;?>              <?php $  i++; ?>             <?php endforeach; ?>             <?php $  resultado->free(); ?>         <?php } while ($  conn->more_results() && $  conn->next_result());?>     </div><!--contenedor--> 

SharePoint 2013 – Failed to install the application content files. An exception of type System.Xml.XmlException was thrown

While running the ‘PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures’ on my web server for the December 2018 CU I ran into the following error.

Failed to install the application content files. An exception of type System.Xml.XmlException was thrown. Configuration of SharePoint Products Failed. Configuration must be performed before you use SharePoint Products.

Have no clue on how to read the logs or what the errors mean. Have not found a solution online, so hope someone here can help.

What causes `std::bad_alloc` to get thrown in this code?

I’m trying to solve Leetcode Problem 22 (which is just a pretty simple application of recursion), and I was trying to memoize the results in order to speed up computation. However, when I try to store a list of pointers to vectors I run into a std::bad_alloc error, whereas when I simply store a list of pointers the program runs fine. I’m relatively new to C++ and pointers and memory allocation, so this might be a really stupid question, but I’ve been looking at the code for a while and I can’t seem to figure it out.

So, this is the code:

#include <iostream> #include <string> #include <vector>  using namespace std;  class Solution { public:     vector<string> generateParenthesis(int n) {         if (n == 0) {             return {};         }         return generateParenthesis_recursive(n);     }      vector<vector<string>*> memo;     vector<string> generateParenthesis_recursive(unsigned int n) {         if (n < memo.size()) {             return *(memo[n]);         }          vector<string> result;         if (n == 0) {             result = {""};         }         else if (n == 1) {             result = {"()"};         }          else if (n > 1) {             vector<string> left, right;             for (unsigned int k = 0; k < n; k++) {                 left  = generateParenthesis_recursive(k);                 right = generateParenthesis_recursive(n - k - 1);                 for (auto left_parenths : left) {                     for (auto right_parenths : right) {                         result.push_back("(" + left_parenths + ")" + right_parenths);                     }                 }             }         }          while (memo.size() <= n) {             memo.push_back(nullptr);         }         memo[n] = &result;         return result;     } };  int main(int argc, char const *argv[]) {     Solution s;      vector<string> output = s.generateParenthesis(4);     for (auto s : output) {         cout << s << " ";     }     cout << endl;      return 0; } 

I’m not quite sure where, or why, but this throws a std::bad_alloc error. However, changing memo to vector<vector<string>> (and changing other various small parts of the code so that it makes sense), it works fine.

What in particular is causing the error here? There’s no infinite loop, the recursion has a well defined base case, and I don’t think I’m allocating too much memory. I don’t see how the program could be failing to allocate memory.